Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: replace url in text with html link

by thealienz1 (Pilgrim)
on May 24, 2005 at 16:03 UTC ( #460059=note: print w/replies, xml ) Need Help??


in reply to replace url in text with html link

My final soultion involved modifying yours to incoporate other punctuation.

$output =~ s#(https?://\S+?)(\.?[\s\<,])#<a href="$1">$1</a>$2#igs;

Thank you for your quick repsonses.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://460059]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2019-10-16 07:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?