This repository was archived by the owner on Oct 11, 2021. It is now read-only.

Description
Description
I just learned that capturing groups inside negated lookarounds behave interestingly. The captured text of a capturing group is reset after leaving a negated lookaround.
This means that the \1 in /(?!(a))\w\1/ is useless. However, the \1 in /(?!(?!(a)))\w\1/ (double negation) is useless too.
This means that (?!(?!R) for some regex R is equivalent to (?=R) if and only if R does not contain capturing groups.
The no-trivially-nested-lookaround does not account for this right now.