$msg = eregi_replace("[^\"\'\=](http|https|ftp|ftps|mailto|torrent)://([$ACCEPT_CHARS]+)", "<a href=\"\\1://\\2\" target=\"_blank\">\\1://\\2</a>", $msg);
I know that I have to use preg_replace instead of eregi_replace, but preg_replace requires a PCRE pattern and I don't know the difference between both patterns (I know nothing about POSIX, to be honest). So, I've simply tried to change eregi_replace to preg_replace and PHP complained at the '('.
[21-Feb-2010 01:48:09] PHP Fatal error: Uncaught exception 'ErrorException' with message 'preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: Unknown modifier '('' in
Any ideas?