Hi, Total newbie on reg exps, and even worse with preg!!!
I get the following error: Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /usr/local/apache/htdocs/lib/lib_string.inc on line 218 Using this code: $str = preg_replace("!([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])!ei", "<a href=\"{$1}://{$2}{$3}\">{$2}{$3}</a>", $str); Can anyone point to the problem? The aim is to perform functions on $2 & $3. TIA Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php