If I create a RegEx from an empty string, how do I make it match nothing?
I was looking for an option like RegexOptions.DoNotMatchWithEmpty or something like that.
To clarify:
Let's assume I have no control over the string that is used to create the RegEx. The string can be empty and I have to create the RegEx object. I probably could set the RegEx to null and add a lot of null checking upstream but I'd rather not do that. Best solution would have been a RegexOptions flag that tells to match nothing when RegEx is constructed with an empty string. But that isn't available.