get

expect operator fun MatchGroupCollection.get(name: String): MatchGroup?(source)

Returns a named group with the specified name.

Since Kotlin

1.9

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 this match group collection doesn't support getting match groups by name, for example, when it's not supported by the current platform.

actual operator fun MatchGroupCollection.get(name: String): MatchGroup?(source)

Returns a named group with the specified name.

Since Kotlin

1.7

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 this match group collection doesn't support getting match groups by name, for example, when it's not supported by the current platform.

actual operator fun MatchGroupCollection.get(name: String): MatchGroup?(source)

Returns a named group with the specified name.

Since Kotlin

1.2

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 this match group collection doesn't support getting match groups by name, for example, when it's not supported by the current platform.

actual operator fun MatchGroupCollection.get(name: String): MatchGroup?(source)

Returns a named group with the specified name.

Since Kotlin

1.7

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 this match group collection doesn't support getting match groups by name, for example, when it's not supported by the current platform.

actual operator fun MatchGroupCollection.get(name: String): MatchGroup?(source)

Returns a named group with the specified name.

Since Kotlin

1.8

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 this match group collection doesn't support getting match groups by name, for example, when it's not supported by the current platform.

actual operator fun MatchGroupCollection.get(name: String): MatchGroup?(source)

Returns a named group with the specified name.

Since Kotlin

1.8

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 this match group collection doesn't support getting match groups by name, for example, when it's not supported by the current platform.