Kotlin Regex
"my string".matches(Regex("[a-z]+ [a-z]+")) // true
"my string".matches(Regex("my")) // false: must match whole string
just-saved-you-a-stackoverflow-visit
"my string".matches(Regex("[a-z]+ [a-z]+")) // true
"my string".matches(Regex("my")) // false: must match whole string
fun main()
{
// Regex to match any string starting with 'a'
// Regex para distinguir cualqueir string que empiece con 'a'
val pattern = Regex("^a")
println(pattern.containsMatchIn("abc"))
println(pattern.containsMatchIn("bac"))
}