String s = "abcde\n fghij<FooBar>"regex = /(?s)(.*)<FooBar>/ def m = s =~ regexprint m[0][1]
Standard input is empty
abcde fghij
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!