fork download
  1. Scanner s=new Scanner(System.in)
  2. def x=s.nextLine()
  3. def n=s.nextInt()
  4. x=x.replaceAll(/\d+/,{it->it.toInteger()*n})
  5. println x
Success #stdin #stdout 1.24s 389184KB
stdin
This 1 is22a 3352sentence 50
3
stdout
This 3 is66a 10056sentence 150