I'm trying to match parenthesis content using Kotlin.
I found that regex should be /\(([^)]+)\)/ but can't have it working in Kotlin.
val pattern = """/\(([^)]+)\)/""".toRegex(RegexOption.LITERAL)
val text = "aaaa (ferf ) veffef (frr) refef"
fun main() {
println(pattern.matches(text))
}
returns false.