maan
"Hello John".replace(Regex("Hello (.*)"), { "Hi ${it.groupValues[1]}"} )
"Hello John".replace(Regex("Hello (.*)”), “Hi $1" )