I am trying to write a regular expression (for use in an ASP.NET RegularExpressionValidator) so that:
If the string to be validated contains the letter A followed by the letter B, validation should fail.
If the string to be validated contains the letter F followed by any of W, X, Y, Z or any digit, validation should fail.
I've come up with this
(AB)|(F(W|X|Y|Z|[0-9]))
but as far as I can tell, validation will succeed if the input does match that expression.
What do I need to do to make the validation fail if the input does not match that expression?
Thanks very much,
David