Something like ```when (testString) { myRegex ...
# announcements
c
Something like
Copy code
when (testString) {
    myRegex -> //do something
    //...
}
k
No, you can't directly. You could go with the other type of
when
of course:
Copy code
when {
    regex.matches(testString) -> ...
    ...
}
c
Yes, that's what I have, just was interested if there is some builtin support with when (testString). Thanks for confirmation.