in reply to Re^2: Answer: How do I replace a URL with a clickable hyperlink?
in thread How do I replace a URL with a clickable hyperlink?

Well, here's what I ended up using: $text =~ s!(^\s+\.com)!$1!gi; This works but the only problem is that sometimes I'm grabbing ABC.com out of a block of text, that also includes an image. In that case, the image code is messed up because the above code looks for white space, then something, then .com, which also matches the html for the image. How can I have the image left along, and the above code applied to ABC.com? Thanks.
  • Comment on Re^3: Answer: How do I replace a URL with a clickable hyperlink?

Replies are listed 'Best First'.
Re^4: Answer: How do I replace a URL with a clickable hyperlink?
by jhourcle (Prior) on Apr 07, 2005 at 01:41 UTC

    You've probably noticed that what you wrote isn't what was displayed. I'd suggest posting this as a node under 'Seekers of Perl Wisdon', and that you place the tags <code></code> around the code, so it doesn't get interpreted as HTML.