fork download
  1. object Main extends App {
  2. def replace(str: String): String = {
  3. val regex = """(\w{3})\w(\w*)""".r
  4. regex.replaceAllIn(str, "$1#$2")
  5. }
  6. println(replace("op hui mat ego shluha"))
  7. }
Success #stdin #stdout 0.39s 322432KB
stdin
Standard input is empty
stdout
op hui mat ego shl#ha