Matcher

final class Matcher
Companion:
object
class Object
trait Matchable
class Any

Value members

Constructors

def this(pattern: Pattern, input: CharSequence)

Concrete methods

def end(): Int
def end(group: Int): Int
def end(_group: String): Int

Returns the end of the named group of the most recent match, or -1 if the group was not matched.

Returns the end of the named group of the most recent match, or -1 if the group was not matched.

Value parameters:
group

the group name

Throws:
java.lang.IllegalStateException

if no group with that name exists

def find(): Boolean
def find(start: Int): Boolean
def group(_group: String): String

Returns the named group of the most recent match, or null if the group was not matched.

Returns the named group of the most recent match, or null if the group was not matched.

Value parameters:
group

the group name

Throws:
java.lang.IllegalStateException

if no group with that name exists

def group(): String
def group(group: Int): String
def region(start: Int, end: Int): Matcher
def regionEnd(): Int
def replaceAll(replacement: String): String
def replaceFirst(replacement: String): String
def reset(): Matcher
def start(): Int
def start(group: Int): Int
def start(_group: String): Int

Returns the start of the named group of the most recent match, or -1 if the group was not matched.

Returns the start of the named group of the most recent match, or -1 if the group was not matched.

Value parameters:
group

the group name

Throws:
java.lang.IllegalStateException

if no group with that name exists

def substring(start: Int, end: Int): String
def usePattern(newPattern: Pattern): Matcher