Replacing deprecated eregi
Posted: Mon May 19, 2014 10:27 pm
I have the following code in a bbcode parser
Since eregi is now deprecated I which to convert it to preg_replace
Can I simply replace eregi_replace or is the regex different?
Code: Select all
if (substr($Text,0, 7) == "http://"){
$Text = eregi_replace("([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])", "<a href=\"\\1://\\2\\3\">\\1://\\2\\3</a>", $Text);
Can I simply replace eregi_replace or is the regex different?