|We don't bite newbies here... much|
Reg expression to replace URLs with Anchor tags in Tweetsby halfbaked (Sexton)
|on Apr 18, 2009 at 23:06 UTC||Need Help??|
halfbaked has asked for the
wisdom of the Perl Monks concerning the following question:
I'm writing a simple script to view Twitter tweets but I'm having trouble converting URLs (http://...) into HTML anchors.
I need a pure Perl solution, I can't use a package, it must be a reg exp.
Here's what I have so far, clearly not working.
I need the regular expression to stop when it hits white space, in this example not including the hashtags (#seattle #seattlenews).
I just don't know how to do that. Needless to say my regular expression knowledge is limited to only the most basic operations.