def regex = /\$\$.*?\$\$/;String s = 'WHERE oid_2 = $$test$$ || oid_2 = $$test2$$'def m = s =~ regex(0..<m.count).each { print m[it] + '\n' }
Standard input is empty
$$test$$ $$test2$$
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!