matches

infix inline fun CharSequence.matches(regex: Regex): Boolean(source)

Returns true if this char sequence matches the given regular expression.

Since Kotlin

1.0

Deprecated

Warning since 1.6

Use Regex.matches() instead

Replace with

regex.toRegex().matches(this)

Since Kotlin

1.1