I want to find strings that do NOT match a particular sequence of characters. For example:
something like
REGEX = r'[^XY]*'
I’d like to look for strings that have any number of characters except an X and Y next to each other…the REGEX above doesn’t work since it blocks X’s and Y’s separately.
How about:
Or is this for inclusion in some longer regexp? Then maybe you want a negative lookahead expression:
EDIT: fixed typo