I want replace specific symbols with sign % using regular expressions on PHP. E.g.
$result = ereg_replace('xlp','%','example')`. //$result = `'e%a%%me'
It is possible or I should use other way?
I want replace specific symbols with sign % using regular expressions on PHP. E.g.
$result = ereg_replace('xlp','%','example')`. //$result = `'e%a%%me'
It is possible or I should use other way?
Copyright © 2021 Jogjafile Inc.
First and foremost, about
ereg_replace:Use
preg_replaceinstead.Next, in your pattern, you are searching for the literal string
xlp. Put them in a character-set to match one of the three.