fork(4) download
  1. a = "%span.rockets#diamonds.ribbons.forever"
  2. a = a.scan(/^%\w+|\G[.|#]\w+/)
  3. puts a.inspect
Success #stdin #stdout 0s 3428KB
stdin
Standard input is empty
stdout
["%span", ".rockets", "#diamonds", ".ribbons", ".forever"]