Package com.google.common.labs.regex
package com.google.common.labs.regex
Regex parser for dev tools
Package Specification
The code is developed and tested under Java 21.-
ClassDescriptionDefines the Abstract Syntax Tree (AST) for a regular expression.Represents a choice between multiple alternative regex patterns.Represents an anchor, which matches a position like start or end of a line.Represents a quantifier with a minimum bound, like
{min,}
,*
, or+
.Represents a quantifier with a maximum bound and a minimum of 0, like{0,max}
or?
.Represents a character property, like\p{Lower}
or\P{Lower}
.Represents a negated character property, like\P{Lower}
.Represents a custom character class, like[a-z]
or[^0-9]
.A positive character class, like[a-z]
.A negated character class, like[^a-z]
.Represents a range of characters within a character class, e.g., 'a-z'.Base interface for elements within aRegexPattern.CharacterSet
.Represents a grouping construct in a regex.A capturing group, like(a)
.A named capturing group, like(?<name>a)
.A non-capturing group, like(?:a)
.Represents a quantifier with both minimum and maximum bounds, like{n}
or{min,max}
.Represents a literal string to be matched.Represents a single literal character within a character class.Represents a lookaround assertion:(?=...)
,(?!...)
,(?<=...)
,(?<!...)
.Positive lookahead:(?=pattern)
.Positive lookbehind:(?<=pattern)
.Negative lookahead:(?!pattern)
.Negative lookbehind:(?<!pattern)
.Represents a POSIX character class inside a CharacterSet: e.g.Represents a predefined character class like\d
or\w
.Represents a regex pattern that is modified by a quantifier.Base interface for all quantifier types.Represents a sequence of regex patterns that must match consecutively.Represents a Unicode property class: e.g.