I have an application that needs some checks for some fields. One of them is a surname, which can consist of two words. In my regex, I have to accept these spaces, so I tried many things, but I did not find a solution.
Here is my regex:
@"^[a-zA-Zàéèêçñ\s][a-zA-Zàéèêçñ-\s]+$"
\s usually for spaces, but it doesn't work, and I got this error message:
parsing "^[a-zA-Zàéèêçñ\s][a-zA-Zàéèêçñ-\s]+$" - Cannot include class \s in character range.
ANY ideas guys?
source
share