I have a regular expression that matches the alphabet, numbers, _ and - (with minimum and maximum length).
^[a-zA-Z0-9_-]{3,100}$
I want to include spaces in this character set.
According to the Python documentation:
Character classes such as \ w or \ S are also accepted within the set.
So I tried:
^[a-zA-Z0-9_-\s]{3,100}$
But this leads to an incorrect character range error. How to include a space in the above set?
source share