a=[""] gets.scan(/(\W(.+?)[\])]|.)(\??)/){b=[""]-[$3]+($2||$1).split($1["|"]||"") a.map!{|s|b.map{|t|s+t}}.flatten!} puts a
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page