Match

scala.util.matching.Regex.Match
See theMatch companion object

Provides information about a successful match.

Attributes

Companion
object
Graph
Supertypes
trait MatchData
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def end(i: Int): Int

The index following the last matched character in group i.

The index following the last matched character in group i.

Attributes

def force: this.type

The match itself with matcher-dependent lazy vals forced, so that match is valid even once matcher is advanced.

The match itself with matcher-dependent lazy vals forced, so that match is valid even once matcher is advanced.

Attributes

The number of subgroups.

The number of subgroups.

Attributes

def start(i: Int): Int

The index of the first matched character in group i.

The index of the first matched character in group i.

Attributes

Inherited methods

def after(i: Int): CharSequence | Null

The char sequence after last character of match in group i, or null if nothing was matched for that group.

The char sequence after last character of match in group i, or null if nothing was matched for that group.

Attributes

Inherited from:
MatchData
def after: CharSequence | Null

Returns char sequence after last character of match, or null if nothing was matched.

Returns char sequence after last character of match, or null if nothing was matched.

Attributes

Inherited from:
MatchData
def before(i: Int): CharSequence | Null

The char sequence before first character of match in group i, or null if nothing was matched for that group.

The char sequence before first character of match in group i, or null if nothing was matched for that group.

Attributes

Inherited from:
MatchData
def before: CharSequence | Null

The char sequence before first character of match, or null if nothing was matched.

The char sequence before first character of match, or null if nothing was matched.

Attributes

Inherited from:
MatchData
def group(id: String): String | Null

Returns the group with the given name.

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

id

The group name

Attributes

Returns

The requested group

Throws
IllegalArgumentException

if the requested group name is not defined

Inherited from:
MatchData
def group(i: Int): String | Null

The matched string in group i, or null if nothing was matched.

The matched string in group i, or null if nothing was matched.

Attributes

Inherited from:
MatchData
def matched: String | Null

The matched string, or null if nothing was matched.

The matched string, or null if nothing was matched.

Attributes

Inherited from:
MatchData
def subgroups: List[String | Null]

All capturing groups, i.e., not including group(0).

All capturing groups, i.e., not including group(0).

Attributes

Inherited from:
MatchData
override def toString(): String

The matched string; equivalent to matched.toString.

The matched string; equivalent to matched.toString.

Attributes

Definition Classes
MatchData -> Any
Inherited from:
MatchData

Concrete fields

val end: Int

The index following the last matched character.

The index following the last matched character.

Attributes

The source from which the match originated

The source from which the match originated

Attributes

val start: Int

The index of the first matched character.

The index of the first matched character.

Attributes

Deprecated fields

The names of the groups, or an empty sequence if none defined

The names of the groups, or an empty sequence if none defined

Attributes

Deprecated
[Since version 2.13.7] groupNames does not include inline group names, and should not be used anymore