fun main() {
val str = "123test123"
val matches = Regex("""test""", RegexOption.MULTILINE).matches(str)
println(matches)
}
p
phldavies
05/22/2020, 12:56 PM
Copy code
/** Indicates whether the regular expression matches the entire [input]. */
actual infix fun matches(input: CharSequence): Boolean = doMatch(input, Mode.MATCH) != null
vs
Copy code
/** Indicates whether the regular expression can find at least one match in the specified [input]. */
actual fun containsMatchIn(input: CharSequence): Boolean = find(input) != null