test

fun test(pattern: Regex, string: String): Boolean

Test whether the string has at least one match by pattern.

Return

true if at least one match, false if no match

Parameters

pattern

the regexp

string

the string to test