Match

class Match(val source: CharSequence, val matcher: Matcher, val groupNames: Seq[String]) extends MatchData

Provides information about a successful match.

Companion
object
Source
Regex.scala
trait MatchData
class Object
trait Matchable
class Any

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.

Source
Regex.scala
def force: Match

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.

Source
Regex.scala

The number of subgroups.

The number of subgroups.

Source
Regex.scala
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.

Source
Regex.scala

Inherited methods

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.

Inherited from
MatchData
Source
Regex.scala

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.

Inherited from
MatchData
Source
Regex.scala

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.

Inherited from
MatchData
Source
Regex.scala

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.

Inherited from
MatchData
Source
Regex.scala
def group(id: String): String

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 Params
id

The group name

Returns

The requested group

Throws
IllegalArgumentException

if the requested group name is not defined

Inherited from
MatchData
Source
Regex.scala
def group(i: Int): String

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

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

Inherited from
MatchData
Source
Regex.scala

The matched string, or null if nothing was matched.

The matched string, or null if nothing was matched.

Inherited from
MatchData
Source
Regex.scala

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

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

Inherited from
MatchData
Source
Regex.scala
override def toString: String

The matched string; equivalent to matched.toString.

The matched string; equivalent to matched.toString.

Definition Classes
Inherited from
MatchData
Source
Regex.scala

Concrete fields

val end: Int

The index following the last matched character.

The index following the last matched character.

Source
Regex.scala
val start: Int

The index of the first matched character.

The index of the first matched character.

Source
Regex.scala