Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

regular expressions

Status
Not open for further replies.

hunt00

Technical User
Mar 6, 2005
79
US
How to get both text link and url link works in regular expression?

Used
$text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\">\\0</a>", $text);

It works fine for the url link, but breaks the text link.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top