7 Dec
2002
7 Dec
'02
7:14 p.m.
I'm looking for a good regular expression that can spot URLs in a text string. Either that or a regular expression that can deduce whether a string piece is a URL or not. I would like to display piece of text where weblinks are converted to <A HREF... Just like when you're reading emails that contain links. Those parsing usually go by startswith("http://") or startswith("www.") I guess. Anybody got one? ...or has an idea of a module that already does this that I can nick. NB: I don't want to check the URLs using urlopen() or equivalent. Must be faster than that. Cheers, Peter