in reply to Re: regular expression inverse match NOT match?
in thread regular expression inverse match NOT match?
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 Section
Seekers of Perl Wisdom