toRegex

inline 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.

Since Kotlin

1.0