No, it only affects /.*/. It doesn't affect any other part of the match, namely, the earlier /<div>/.
The following would do here:Is there a way to match a string contained between two delimiters which does not contain a given word? (not a class)
m{<div>(?:(?!</div>).)*</div>}
In reply to Re^3: regular expression and nested tags
by ikegami
in thread regular expression and nested tags
by vitoco
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |