Sort of a two part question:
- Is there any theoretical regular expression that will never match any string (using general syntax without any fancy stuff provided by modern regular expression matchers)?
- Is there a simple way to use C#’s Regex syntax to create a regex that will never match any string (this time, all the fancy stuff is included)?
NOTE: I am not referring to matching the empty string (that would be easy, just "").
Just as you can match any characters with
[\s\S], you can match no characters with[^\s\S](or[^\w\W], etc).