W3cubDocs

/Kotlin

MatchGroup

Platform and version requirements:
class MatchGroup
Platform and version requirements: JVM (1.0), JS (1.1), Native (1.3)
data class MatchGroup
For JVM, Native

Represents the results from a single capturing group within a MatchResult of Regex.

Parameters

value - The value of captured group.

range -

The range of indices in the input string where group was captured.

The range property is available on JVM only.

For JS

Represents the results from a single capturing group within a MatchResult of Regex.

Parameters

value - The value of captured group.

Constructors

<init>

Represents the results from a single capturing group within a MatchResult of Regex.

Platform and version requirements: JS (1.1)
MatchGroup(value: String)
Platform and version requirements: JVM (1.0), Native (1.3)
<init>(value: String, range: IntRange)

Properties

Platform and version requirements: JVM (1.0), Native (1.0)

range

The range of indices in the input string where group was captured.

val range: IntRange
Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)

value

The value of captured group.

val value: String

© 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-group/index.html