The following code is a modified example from Groovy in Action but I don't understand what it does.
I never seem to be able to get the 'matched candidate with regex' (which is what I think the code is supposed/!supposed to do) regardless of how I change the 1st / 3rd argument. Has anyone got any suggestions on what needs to be changed in order to make it work and print out this line.
The code is from page 165 of the book and I'm using groovy 1.6.5
Joined: Aug 29, 2007
It looks like you had a couple minor errors in the regex:
GinA page 165 code has this:
and your example has this:
Notice the sequence: ".[a-zA" from GinA. Your example has ".=a-za"
I hope that helps,
Author of Grails: A Quick-Start Guide
Joined: Jun 26, 2008
Doh, school boy error. Can't believe I didn't check the pattern first.