Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 cooling their heels in the Monastery: (11)
As of 2016-12-06 20:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (116 votes). Check out past polls.