As in Kotlin 1.0, the Regex class does not provide a way to access mapped named groups in MatchGroupCollection , because the standard library can only use the api regular expression available in JDK6, which does not have support for the named groups either.
If you are targeting JDK8, you can use the java.util.regex.Pattern and java.util.regex.Matcher classes. The latter provides a group method to get the result of a named-capture group match.
Ilya
source share