Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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 a moth chases the moon...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2017-08-23 06:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (347 votes). Check out past polls.

    Notices?