Pattern (Java SE 22 [ad-hoc build]) (original) (raw)
Field Summary
Fieldsstatic final int
Enables canonical equivalence.static final int
Enables case-insensitive matching.static final int
Permits whitespace and comments in pattern.static final int
static final int
Enables literal parsing of the pattern.static final int
static final int
Enables Unicode-aware case folding.static final int
Enables the Unicode version of Predefined character classes and_POSIX character classes_.static final int
Method Summary
Creates a predicate that tests if this pattern matches a given input string.
Creates a predicate that tests if this pattern is found in a given input string.
Compiles the given regular expression into a pattern.
Compiles the given regular expression into a pattern with the given flags.int
[flags](#flags%28%29)()
Returns this pattern's match flags.
Creates a matcher that will match the given input against this pattern.static boolean
Compiles the given regular expression and attempts to match the given input against it.
Returns an unmodifiable map from capturing group names to group numbers.[pattern](#pattern%28%29)()
Returns the regular expression from which this pattern was compiled.
Returns a literal pattern String
for the specifiedString
.
Splits the given input sequence around matches of this pattern.
Splits the given input sequence around matches of this pattern.
Creates a stream from the given input sequence around matches of this pattern.
Splits the given input sequence around matches of this pattern and returns both the strings and the matching delimiters.[toString](#toString%28%29)()
Returns the string representation of this pattern.
Field Details
UNIX_LINES
CASE_INSENSITIVE
MULTILINE
LITERAL
DOTALL
UNICODE_CASE
CANON_EQ
UNICODE_CHARACTER_CLASS
Method Details
compile
compile
pattern
toString
matcher
flags
matches
split
splitWithDelimiters
split
quote
namedGroups
asPredicate
asMatchPredicate
splitAsStream