RegexParser
Java-regex-style parser producing a normalized Regex.
Supported subset (see Regex doc): literals, escapes (\d \D \s \S \w \W \t \n \r \f \a \e \v \cX \0[n[n]] \xhh \x{h...h} \uhhhh \Q...\E \R and meta-escapes . * + ? ( ) [ ] { } | ^ $ -), ., char classes [...] [^...] with ranges (\b inside a class means backspace, matching Java), alternation |, groups (...) (capturing or (?:...), flag groups are NOT supported), quantifiers * + ? {n} {n,} {n,m} (bounds capped at Regex.maxRepeatBound).
Unsupported: anchors ^ $ \b \B \A \Z \z \G, lookaround, backreferences \1..\9 \k \g{...}, Unicode properties \p{...}, grapheme clusters \X, named groups, flag groups. Any other undefined letter escape (e.g. \m, \y, \q) is rejected as invalid syntax, matching java.util.regex.Pattern's own behavior.
Known gaps relative to java.util.regex.Pattern (tracked, not yet implemented):
- in-class intersection
[a-z&&[^g-p]]is silently misparsed as literal chars instead of being rejected or computing the intersection - shorthand classes nested inside a character class, e.g.
[\d.], are rejected outright instead of being unioned into the class like Java does
Attributes
- Graph
-
- Supertypes
- Self type
-
RegexParser.type