matches

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

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

fun String.matches(regex: String): Boolean