fork(2) download
  1. s = "here is 1 theword here is 2"
  2. puts s.sub!(/(theword).*/mi, "\\1")
Success #stdin #stdout 0.05s 9792KB
stdin
Standard input is empty
stdout
here is 1 theword