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
That's because your pattern contains a .-^ which is all characters between and including . and ^, which included digits and several other characters as shown below:
If by special characters, you mean punctuation and symbols use:
[\p{P}\p{S}]
which contains all unicode punctuation and symbols.