conditional lookahead (IF (pat1) or (pat2) THEN match (pat1) and/or (pat2) box
Python does not support conditionals using lookaround, even though Python does support lookaround outside conditionals.
(?(?=regex) then|else) is illegal in python
(?=regex)then|(?!regex)else - this works.
madness
details in the test strings
Submitted by PeteC - 3 years ago