Mega Code Archive

 
Categories / Php / Strings
 

Back-reference parenthesized substrings

<? $url = "rntsoft (http://www.rntsoft.com)"; $url = ereg_replace("http://(([A–Za–z0–9.\-])*)", "<a href=\"\\0\">\\0</a>",$url); print $url; ?>