get

abstract operator fun get(name: String): MatchGroup?(source)

Returns a named group with the specified name.

Since Kotlin

1.1

Return

An instance of MatchGroup if the group with the specified name was matched or null otherwise.

Throws

if there is no group with the specified name defined in the regex pattern.

if getting named groups isn't supported on the current platform.

abstract operator fun get(name: String): MatchGroup?(source)

Returns a named group with the specified name.

Since Kotlin

1.1

Return

An instance of MatchGroup if the group with the specified name was matched or null otherwise.

Throws

if there is no group with the specified name defined in the regex pattern.

if getting named groups isn't supported on the current platform.