kotlin-stdlib / kotlin.text / matches matches Common JVM JS Native 1.0 infix fun CharSequence.matches(regex: Regex): Boolean(source) Returns true if this char sequence matches the given regular expression. JS 1.1 @DeprecatedSinceKotlin("1.6") fun String.matches( regex: String): Boolean(source) Deprecated: Use Regex.matches() instead