Other Resources:
Strings Containing Neither A Nor B
How to match strings that contain neither A nor B using regex?
✍: FYIcenter.com
Regular Expression does not support NOT operator on a sub pattern. "Neither A nor B" must be implemented by a "Negative Look-Ahead" assertion.
Let's assume that we have following text:
The regular expression pattern will match answers that are neither A nor B, with "m" modifier:
is (?!A|B)(.)\.
(?!A|B) - look ahead for a letter neither A nor B.
(.) - capture that letter.
2016-06-23, 0👍, 0💬
Popular Posts:
According to the IEEE 802 specification, a MAC address has 6 groups of 2 hexadecimal digits separate...
How to write a regular expression to validate GUID (Globally Unique IDentifier) or UUID (Universally...
How to capture the MSN (Microsoft Network) bot entries from Web log file? Here are some Web log file...
How to capture the MSN (Microsoft Network) bot entries from Web log file? Here are some Web log file...
According to the IEEE 802 specification, a MAC address has 6 groups of 2 hexadecimal digits separate...