I'm trying to find the best way to do this in PHP :
I have to analyse a string.
Some characters are forbidden (i.e. : comma, semicomma, space, percentage... but it can be any character I want, not only punctuation signs !)
I would like to print a line FOR EACH forbidden character in the string :
$string = "My taylor, is rich%";
After analyse, I want to print :
Character COMMA is forbidden
Character PERCENTAGE is forbidden
The summum could be to have only one line for multiple errors with the same character.
Did some of you experienced such a problem ?
I've tried REGEX and STRPOS, but without significant result.