This does work `"Hello John".replace(Regex("Hello ...
# announcements
m
This does work
"Hello John".replace(Regex("Hello (.*)"), { "Hi ${it.groupValues[1]}"} )
But I’m hoping to find simpler way. I tried this but it didn’t work:
"Hello John".replace(Regex("Hello (.*)”), “Hi $1" )