v1.9.10
  • Solutions
    • Multiplatform
    • Server-side
    • Data science
    • Android
  • Docs
  • Community
  • Teach
  • Play
    • Playground
    • Examples
    • Koans
← 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
Kotlin™ is protected under the Kotlin Foundation and licensed under the Apache 2 license.
Supported and developed by JetBrains