can someone transform this ereg_replace expression to preg_replace?
$string = mb_ereg_replace('([ -.,+?()$[];_=])'
.$oldvalue.'([ -.,+?()$[];_=])',"\1"
.$newvalue."\2",$string);
Basically it searches a string ($oldvalue) which is preceded by space or dash or fullstop or plus sign or parenthesis or brackets or question-mark or equal sign and is followed by one of these too and transforms it to (whatever was preceding)$newvalue(whatever was following).
I need to switch to preg_replace due to technical limitations, I hope someone can help!
Thank you!
See Question&Answers more detail:os