← Docs
kotlin-stdlib / kotlin.text / java.util.regex.Pattern / toRegex

toRegex

JVM
1.0
fun Pattern . toRegex ( ) : Regex
(source)

Converts this java.util.regex.Pattern to an instance of Regex .

Provides the way to use Regex API on the instances of java.util.regex.Pattern .

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 .