This class provides methods to access the details of a match.
| Supertypes | |
|---|---|
| Known subtypes |
The index following the last matched character, or -1 if nothing was matched.
The index following the last matched character in group i, or -1 if nothing was matched for that group.
The number of capturing groups in the pattern. (For a given successful match, some of those groups may not have matched any input.)
Basically, wraps a platform Matcher.
The index of the first matched character, or -1 if nothing was matched
The index of the first matched character in group i, or -1 if nothing was matched for that group.
Returns char sequence after last character of match, or null if nothing was matched.
The char sequence after last character of match in group i, or null if nothing was matched for that group.
The char sequence before first character of match, or null if nothing was matched.
The char sequence before first character of match in group i, or null if nothing was matched for that group.
The matched string in group i, or null if nothing was matched.
Returns the group with the given name.
Uses explicit group names when supplied; otherwise, queries the underlying implementation for inline named groups. Not all platforms support inline group names.
| Value parameters |
|
|---|---|
| Returns | The requested group |
| Throws |
|
The matched string, or null if nothing was matched.
All capturing groups, i.e., not including group(0).
The matched string; equivalent to matched.toString.
| Definition Classes | Any |
|---|
The source from which the match originated
© 2002-2022 EPFL, with contributions from Lightbend.
Licensed under the Apache License, Version 2.0.
https://scala-lang.org/api/3.2.0/scala/util/matching/Regex$$MatchData.html