foo = "<p>A</p>,<p>B</p>,<p>C</p>".scan(/<p>(.*?)<\/p>/i).flattenp(foo)
Standard input is empty
["A", "B", "C"]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!