MatchResult

interface MatchResult

Represents the results from a single regular expression match.

Types

Destructured
Link copied to clipboard
class Destructured

Provides components for destructuring assignment of group values.

Functions

next
Link copied to clipboard
abstract fun next(): MatchResult?

Returns a new MatchResult with the results for the next match, starting at the position at which the last match ended (at the character after the last matched character).

Properties

destructured
Link copied to clipboard
open val destructured: MatchResult.Destructured

An instance of MatchResult.Destructured wrapper providing components for destructuring assignment of group values.

groups
Link copied to clipboard
abstract val groups: MatchGroupCollection

A collection of groups matched by the regular expression.

groupValues
Link copied to clipboard
abstract val groupValues: List<String>

A list of matched indexed group values.

range
Link copied to clipboard
abstract val range: IntRange

The range of indices in the original string where match was captured.

value
Link copied to clipboard
abstract val value: String

The substring from the input string captured by this match.