Is is possible to construct a regular expression that rejects all input strings?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Probably this:
\w – word character (letter, digit, etc)
\W – opposite of \w
[^\w\W] – should always fail, because any character should belong to one of the character classes – \w or \W
Another snippets:
$ – assert position at the end of the string
^ – assert position at the start of the line
. – any char
Empty lookahead/behind should work: