Currently rejected at parse time with RegexParseError.UnsupportedFeature (see RegexParser.scala, the '^' | '$' => unsupported(...) and 'A' | 'Z' | 'z' | 'G' => unsupported(...) cases, plus \b/\B word-boundary escapes).
Anchors don't fit the pure Brzozowski-derivative model directly (derivatives consume one code point at a time and don't see "position in string" or neighboring characters), so supporting them will likely require either:
- extending
Regex/Subset with zero-width assertion nodes evaluated against surrounding context during matching, or
- a documented restriction (e.g. only
^/\A at the very start and $/\z/\Z at the very end of a pattern, no mid-pattern anchors).
Scope for 1.0.0: at minimum ^ and $ (most commonly used); \b/\B/\A/\Z/\z/\G can follow once the mechanism is proven.
Currently rejected at parse time with
RegexParseError.UnsupportedFeature(seeRegexParser.scala, the'^' | '$' => unsupported(...)and'A' | 'Z' | 'z' | 'G' => unsupported(...)cases, plus\b/\Bword-boundary escapes).Anchors don't fit the pure Brzozowski-derivative model directly (derivatives consume one code point at a time and don't see "position in string" or neighboring characters), so supporting them will likely require either:
Regex/Subsetwith zero-width assertion nodes evaluated against surrounding context during matching, or^/\Aat the very start and$/\z/\Zat the very end of a pattern, no mid-pattern anchors).Scope for 1.0.0: at minimum
^and$(most commonly used);\b/\B/\A/\Z/\z/\Gcan follow once the mechanism is proven.