easy regexp by flagitious

def r n,s=''
n[/(\W(.*?)[])]|.)\??/]?(l=$'
r l,s if$&['?']
$+.split($+['|']||'').map{|j|r l,s+j}):puts(s)end
r *$<

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top