php - How can i get rid of this letter from all my strings? -
I have a list of games and areas in my database and I have made exceptions, they finally lost the bracket Has been designated like Sonic Hedgehog (E ) but the letter E will be converted to many different areas.
How can I get rid of only one single class and letters? It always helps the last part of my string if it helps.
Thanks
Preg_replace
:
$ str = preg_replace ('/ \ ([^)] $ /', '', $ str);
This will replace a left bracket that follows any character except the right bracket at the end of the input with the empty string.
Comments
Post a Comment