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