RegEx and URLs

From: Date: Wed, 31 Jan 2001 13:48:03 +0000
Subject: RegEx and URLs
Groups: php.general 
Request: Send a blank email to php-general+get-37475@lists.php.net to get a copy of this message
Either I missed the answer on the mailing list, or it was accidentally skipped, so I'll re-ask... I have a bit of text ( a TEXT field in mySQL ) and there may or may not be URLs in this text. (These URLs are defined as anything starting with http://, mailto:, or www.). Some of these URLs may or may not be already contained with an HTML A HREF tag. I need a regular expression that'll find these URLs and convert them to valid A HREF tags while leaving those URLs that are already in appropriate tags alone. Can anybody offer any assitance on this? I'm afraid I'm a bit weak in the regex areas....

« previous php.general (#37475) next »