fork(2) download
  1. s = 'jeep/grand cherokee////////hyundai/////harley davidson//bmw'
  2. p s.gsub(/\/{3,}/, '//')
Success #stdin #stdout 0.01s 6448KB
stdin
Standard input is empty
stdout
"jeep/grand cherokee//hyundai//harley davidson//bmw"