Java java.util.regex Matcher fields, constructors, methods, implement or subclass

Example usage for Java java.util.regex Matcher fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.util.regex Matcher.

The text is from its open source code.

Field

booleanhitEnd
Boolean indicating whether or not more input could change the results of the last match.

Method

MatcherappendReplacement(StringBuffer sb, String replacement)
Implements a non-terminal append-and-replace step.
MatcherappendReplacement(StringBuilder sb, String replacement)
Implements a non-terminal append-and-replace step.
StringBufferappendTail(StringBuffer sb)
Implements a terminal append-and-replace step.
StringBuilderappendTail(StringBuilder sb)
Implements a terminal append-and-replace step.
intend()
Returns the offset after the last character matched.
intend(int group)
Returns the offset after the last character of the subsequence captured by the given group during the previous match operation.
intend(String name)
Returns the offset after the last character of the subsequence captured by the given named-capturing group during the previous match operation.
booleanfind()
Attempts to find the next subsequence of the input sequence that matches the pattern.
booleanfind(int start)
Resets this matcher and then attempts to find the next subsequence of the input sequence that matches the pattern, starting at the specified index.
Stringgroup()
Returns the input subsequence matched by the previous match.
Stringgroup(int group)
Returns the input subsequence captured by the given group during the previous match operation.
Stringgroup(String name)
Returns the input subsequence captured by the given named-capturing group during the previous match operation.
intgroupCount()
Returns the number of capturing groups in this matcher's pattern.
booleanlookingAt()
Attempts to match the input sequence, starting at the beginning of the region, against the pattern.
booleanmatches()
Attempts to match the entire region against the pattern.
Patternpattern()
Returns the pattern that is interpreted by this matcher.
StringquoteReplacement(String s)
Returns a literal replacement String for the specified String .
Matcherregion(int start, int end)
Sets the limits of this matcher's region.
intregionEnd()
Reports the end index (exclusive) of this matcher's region.
intregionStart()
Reports the start index of this matcher's region.
StringreplaceAll(String replacement)
Replaces every subsequence of the input sequence that matches the pattern with the given replacement string.
StringreplaceAll(Function replacer)
Replaces every subsequence of the input sequence that matches the pattern with the result of applying the given replacer function to the match result of this matcher corresponding to that subsequence.
StringreplaceFirst(String replacement)
Replaces the first subsequence of the input sequence that matches the pattern with the given replacement string.
StringreplaceFirst(Function replacer)
Replaces the first subsequence of the input sequence that matches the pattern with the result of applying the given replacer function to the match result of this matcher corresponding to that subsequence.
Matcherreset()
Resets this matcher.
Matcherreset(CharSequence input)
Resets this matcher with a new input sequence.
intstart(int group)
Returns the start index of the subsequence captured by the given group during the previous match operation.
intstart(String name)
Returns the start index of the subsequence captured by the given named-capturing group during the previous match operation.
intstart()
Returns the start index of the previous match.
MatchResulttoMatchResult()
Returns the match state of this matcher as a MatchResult .
StringtoString()

Returns the string representation of this matcher.

MatcheruseAnchoringBounds(boolean b)
Sets the anchoring of region bounds for this matcher.
MatcherusePattern(Pattern newPattern)
Changes the Pattern that this Matcher uses to find matches with.
MatcheruseTransparentBounds(boolean b)
Sets the transparency of region bounds for this matcher.