kotlin regex
snippet in kotlin

kotlin regex

user3239

"my string".matches(Regex("[a-z]+ [a-z]+")) // true
"my string".matches(Regex("my")) // false: must match whole string