[Solved] Convert specific eregi_replace to preg_replace function [closed]


But to help. Just add delimeters to the begining and end of the pattern, I used # and escape any delimiters that are in the pattern with \ so the engine knows its not a delimeter, so \#:

$sText = preg_replace('#(((f|ht){1}tp://)[-a-zA-Z0-9@:%_+.~\#?&//=]+)#',
 '<a href="https://stackoverflow.com/questions/19717752/" target="_blank"><font color="black">\1</font></a>', $sText);

3

solved Convert specific eregi_replace to preg_replace function [closed]