/^chars(?!.*that).*this.*(?<!whatever)$/
If "whatever" is actually a pattern that can match more than a single length of string, then instead use:
/^chars(?!.*that).*this(?!.*whatever$)/
And note that the (?!.*that) part doesn't need to be repeated.
- tye
In reply to Re: Problem with negative lookahead at end of string
by tye
in thread Problem with negative lookahead at end of string
by olivierp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |