I want to write a simple regular expression to check if in given string exist any special character. My regex works but I don\'t know why it also includes all numbers, so wh
For people (like me) looking for an answer for special characters like Ä etc. just use this pattern:
Only text (or a space): "[A-Za-zÀ-ȕ ]"
Text and numbers: "[A-Za-zÀ-ȕ0-9 ]"
Text, numbers and some special chars: "[A-Za-zÀ-ȕ0-9(),-_., ]"
Regex just starts at the ascii index and checks if a character of the string is in within both indexes [startindex-endindex].
So you can add any range.
Eventually you can play around with a handy tool: https://regexr.com/
Good luck;)