Am 07.12.2002, 20:14 Uhr schryb Peter Bengtsson <mail@peterbe.com>:
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.
We use the attached code (it doesn't use regular expressions, but it works pretty well for us). It can add links to plain text or html, doesn't destroy URLs inside tags (like in <param codebase="http://somewhere...">) and recognizes "http://", "ftp://", "www." and things containing "@". Hope it helps. Jo. -- Internetmanufaktur Jo Meder ---------------------- Berlin, Germany http://www.meder.de/ ------------------- fon: ++49-30-417 17 63 33 Kollwitzstr. 75 ------------------------ fax: ++49-30-417 17 63 45 10435 Berlin --------------------------- mob: ++49-170- 2 98 89 97 Public GnuPG-Key ---------- http://www.meder.de/keys/jo-pubkey.txt