xxxxxxxxxx
val string = "hello world"
val pattern = "world"
val regex = Regex(pattern)
val contains = regex.containsMatchIn(string)
if (contains) {
println("The string contains the pattern.")
} else {
println("The string does not contain the pattern.")
}