RegExpMatch

external interface RegExpMatch

Represents the return value of RegExp.exec.

Properties

index
Link copied to clipboard
abstract val index: Int
input
Link copied to clipboard
abstract val input: String
length
Link copied to clipboard
abstract val length: Int

Extensions

asArray
Link copied to clipboard
inline fun RegExpMatch.asArray(): Array<out String?>

Converts the result of RegExp.exec to an array where the first element contains the entire matched text and each subsequent element is the text matched by each capturing parenthesis.

get
Link copied to clipboard
inline operator fun RegExpMatch.get(index: Int): String?

Returns the entire text matched by RegExp.exec if the index parameter is 0, or the text matched by the capturing parenthesis at the given index.