fork download
  1. rx = /(?:\G(?!\A)|\A(?=(?:#\d\s*)*\z))\s*\K#\d/
  2. p "#1 #2".scan(rx)
  3. p "#1 NO #2".scan(rx)
Success #stdin #stdout 0s 28224KB
stdin
Standard input is empty
stdout
["#1", "#2"]
[]