def replace
(str
: String
): String
= { val regex
= """(\w{3})(\w)(\w*)""".
r regex.
replaceAllIn(str,
_ match { s"$s1#$s2"
})
}
println(replace("op hui mat ego shluha"))
}
b2JqZWN0IE1haW4gZXh0ZW5kcyBBcHAgewogIGRlZiByZXBsYWNlKHN0cjogU3RyaW5nKTogU3RyaW5nID0gewogICAgdmFsIHJlZ2V4ID0gIiIiKFx3ezN9KShcdykoXHcqKSIiIi5yCiAgICByZWdleC5yZXBsYWNlQWxsSW4oc3RyLCBfIG1hdGNoIHsKICAgICAgY2FzZSByZWdleChzMSwgXywgczIpID0+CiAgICAgICAgcyIkczEjJHMyIgogICAgfSkKICB9CiAgcHJpbnRsbihyZXBsYWNlKCJvcCBodWkgbWF0IGVnbyBzaGx1aGEiKSkKfQ==