Avatar of Oliver2000
Oliver2000
Flag for Brazil

asked on 

change ereg_replace into preg_replace problem

Hi experts,

I change all my ereg_replace into preg_replace but I have a line where I am not sure if this is going to work so easy. How ever I cant test it either very well because I am not even sure what this line does.

the original line is:
$value = ereg_replace('(&#[0]*58;|&#[xX][0]*3[aA];|\\\\[xX][0]*3[aA];|\\\\[uU][0]*3[aA];)', '', $value);

and I thought I change to:
$value = preg_replace('/(&#[0]*58;|&#[xX][0]*3[aA];|\\\\[xX][0]*3[aA];|\\\\[uU][0]*3[aA];)/', '', $value);

would this be correct? (placed a / before and in the end of the regex)
thanks...
PHPWeb DevelopmentWeb Languages and Standards

Avatar of undefined
Last Comment
Oliver2000

8/22/2022 - Mon