Currently rejected at parse time (see RegexParser.scala: if c.isDigit then unsupported(s"backreference \$c`"), and case 'k' => unsupported(...), case 'g' => unsupported(...)`).
Depends on #18 (backreferences need named/numbered groups to exist first).
Also worth noting: backreferences make a regex language non-regular in general, which is a much bigger conceptual change for this library — Brzozowski derivatives and the exact subset-containment guarantee this library is built around (Subset.subset) are defined over regular languages. Supporting backreferences may mean explicitly documenting that subset/containment queries become approximate or unsupported for patterns that use them, rather than extending the same exact-containment guarantee.
Currently rejected at parse time (see
RegexParser.scala:if c.isDigit then unsupported(s"backreference \$c`"), andcase 'k' => unsupported(...),case 'g' => unsupported(...)`).Depends on #18 (backreferences need named/numbered groups to exist first).
Also worth noting: backreferences make a regex language non-regular in general, which is a much bigger conceptual change for this library — Brzozowski derivatives and the exact subset-containment guarantee this library is built around (
Subset.subset) are defined over regular languages. Supporting backreferences may mean explicitly documenting that subset/containment queries become approximate or unsupported for patterns that use them, rather than extending the same exact-containment guarantee.