regex - Regular expression that rejects all input? -


is possible construct regular expression rejects input strings?

probably this:

[^\w\w] 

\w - word character (letter, digit, etc)
\w - opposite of \w

[^\w\w] - should fail, because character should belong 1 of character classes - \w or \w

another snippets:

$.^ 

$ - assert position @ end of string
^ - assert position @ start of line
. - char

(?#it's comment inside of empty regex) 

empty lookahead/behind should work:

(?<!) 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -