is there a when syntax that allows me to match a s...
# announcements
g
is there a when syntax that allows me to match a string on a regex?
Copy code
val capturedText: String = ...
return when(capturedText){
  matches myPattern -> thingies
  else -> otherThingies
}