I receive from the client a string like this one:
"a, b, c, d 5%, e, f, g 76%, h (string,string), i"
I want to create a regExp that can remove from the string 5%, 76% (and any other possible percent value n%) and the brackets (bracket opening is replaced by comma). The desired result is:
"a, b, c, d, e, f, g, h, string, string, i"
Is this possible with PHP?
Yes this is possible with PHP,
use this function :
http://php.net/manual/en/function.preg-replace.php
You will need to write a regular expression to match your criteria.