W3cubDocs

/Kotlin

get

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
abstract operator fun get(name: String): MatchGroup?

Returns a named group with the specified name.

Exceptions

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

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

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

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-match-named-group-collection/get.html