Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Answer: How do I replace a URL with a clickable hyperlink?

by Abigail-II (Bishop)
on Jul 14, 2003 at 15:17 UTC ( #274001=categorized answer: print w/replies, xml ) Need Help??

Q&A > regular expressions > How do I replace a URL with a clickable hyperlink? - Answer contributed by Abigail-II

If you are interested in matching valid HTTP URI's, you could use Regexp::Common:
use Regexp::Common; $text =~ s[($RE{URI}{HTTP})] [<a href = "$1">$1</a>]g;

Abigail

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2017-01-17 19:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (158 votes). Check out past polls.