p " some other text in downcase LOREM (foo, bar)".scan(/(?:\G(?!\A)\s*,\s*|\sLOREM\s+\()\K\w+(?=[^()]*\)\z)/)
Standard input is empty
["foo", "bar"]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!