I need to build a regex (in PHP) that match if a string has at least one character different from a set provided. Here is my set:
A to Z and a to z, numbers, and áéíóúüÁÉÍÓÚÜ¡¿!?-:
So this word should not match: Sebastián
This match: Sebastiàn
I reprhased the question due to the comment of varchar256. BTW, when examples differ from verbose instructions, take the example as the true intention of the author of the doc.
Note the
^inside the brackets – that inverts the match, so this regex will match on any strings which contains at least one character that is NOT listed inside the brackets.