MatchData

trait MatchData

This class provides methods to access the details of a match.

Source:
Regex.scala
class Object
trait Matchable
class Any
class Match

Value members

Abstract methods

def end: Int

The index following the last matched character, or -1 if nothing was matched.

The index following the last matched character, or -1 if nothing was matched.

Source:
Regex.scala
def end(i: Int): Int

The index following the last matched character in group i, or -1 if nothing was matched for that group.

The index following the last matched character in group i, or -1 if nothing was matched for that group.

Source:
Regex.scala

The number of capturing groups in the pattern.

The number of capturing groups in the pattern. (For a given successful match, some of those groups may not have matched any input.)

Source:
Regex.scala
protected def matcher: Matcher

Basically, wraps a platform Matcher.

Basically, wraps a platform Matcher.

Source:
Regex.scala
def start: Int

The index of the first matched character, or -1 if nothing was matched

The index of the first matched character, or -1 if nothing was matched

Source:
Regex.scala
def start(i: Int): Int

The index of the first matched character in group i, or -1 if nothing was matched for that group.

The index of the first matched character in group i, or -1 if nothing was matched for that group.

Source:
Regex.scala

Concrete methods

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.

Source:
Regex.scala

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.

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.

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.

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.

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 parameters:
id

The group name

Returns:

The requested group

Throws:
IllegalArgumentException

if the requested group name is not defined

Source:
Regex.scala

The matched string, or null if nothing was matched.

The matched string, or null if nothing was matched.

Source:
Regex.scala

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

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

Source:
Regex.scala
override def toString: String

The matched string; equivalent to matched.toString.

The matched string; equivalent to matched.toString.

Definition Classes
Source:
Regex.scala

Abstract fields

The source from which the match originated

The source from which the match originated

Source:
Regex.scala

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

Deprecated
Source:
Regex.scala