← Docs
kotlin-stdlib / kotlin.text / MatchResult / groups

groups

Common
JVM
JS
Native
1.0
abstract val groups : MatchGroupCollection
(source)

A collection of groups matched by the regular expression.

This collection has size of groupCount + 1 where groupCount is the count of groups in the regular expression. Groups are indexed from 1 to groupCount and group with the index 0 corresponds to the entire match.

Stay in touch:
  • Contributing to Kotlin
  • Releases
  • Press Kit
  • Security
  • Blog
  • Issue Tracker
  • Brand assets
  • Careers
Supported and developed by JetBrains .
Kotlin™ is protected under the Kotlin Foundation
and licensed under the Apache 2 license .