[JS] Support named capture groups in Regex #KT-51775
This commit is contained in:
committed by
Space
parent
cf79752c14
commit
c3f5d03b36
@@ -24,7 +24,8 @@ package kotlin.text
|
||||
*
|
||||
* @return An instance of [MatchGroup] if the group with the specified [name] was matched or `null` otherwise.
|
||||
* @throws IllegalArgumentException if there is no group with the specified [name] defined in the regex pattern.
|
||||
* @throws UnsupportedOperationException if getting named groups isn't supported on the current platform.
|
||||
* @throws UnsupportedOperationException if this match group collection doesn't support getting match groups by name,
|
||||
* for example, when it's not supported by the current platform.
|
||||
*/
|
||||
@SinceKotlin("1.2")
|
||||
public operator fun MatchGroupCollection.get(name: String): MatchGroup? {
|
||||
|
||||
Reference in New Issue
Block a user