Pattern (Java SE 23 & JDK 23)
-
Field Summary
Fields
static final intEnables canonical equivalence.
static final intEnables case-insensitive matching.
static final intPermits whitespace and comments in pattern.
static final intstatic final intEnables literal parsing of the pattern.
static final intstatic final intEnables Unicode-aware case folding.
static final intEnables 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.
intflags()Returns this pattern's match flags.
Creates a matcher that will match the given input against this pattern.
static booleanCompiles 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()Returns the regular expression from which this pattern was compiled.
Returns a literal pattern
Stringfor 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()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
-