matches

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

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

JS
fun String.matches(regex: String): Boolean