Does anyone know why this code returns false? ```f...
# kotlin-native
p
Does anyone know why this code returns false?
Copy code
fun main() {
    val str = "123test123"
    val matches = Regex("""test""", RegexOption.MULTILINE).matches(str)
    println(matches)
}
p
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
p
Thanks, got it 🙂