If it's just spaces, then you can use
/AB\s*CDE/
But if they can be any characters except the sequence CDE, you can use
/AB(?:(?!CDE).)*CDE/s
(?:(?!PAT).)* is to PAT as [^CHAR]* is to CHAR.
In reply to Re^2: regular expression inverse match NOT match?
by ikegami
in thread regular expression inverse match NOT match?
by virtuemart2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |