What is the Groovy equivalent of the following Perl code?
my $txt = \"abc : groovy : def\"; if ($txt =~ / : (.+?) : /) { my $match = $1; print \"MATCH=$m
This was the closest match to the Perl code that I could achieve:
def txt = "abc : groovy : def" if ((m = txt =~ / : (.+?) : /)) { def match = m.group(1) println "MATCH=$match" }