s = '{{something|a}} text text {{another|one|with|more|items}}'p s.scan(/{{(.*?)}}/).flatten.map{ |x| x.split("|") }
Standard input is empty
[["something", "a"], ["another", "one", "with", "more", "items"]]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!