Posted By

hansamann on 02/02/07


Tagged

regex regular expressions groovyseries


Versions (?)

Who likes this?

6 people have marked this snippet as a favorite

jsbournival
bootz15
hendersk
mbanfi
adaptives
javadude


Groovy Series: Regular Expressions 1/3


 / Published in: Groovy
 

URL: http://hansamann.podspot.de/files/grails_podcast_episode_32_1036.mp3

This snippet gives you some interesting examples what you can do with Strings and GStrings in Groovy. Listen to the audio to get the best learning experience. Simply right-click on the title above -> Save as... to download the mp3 file of this part of the series.

The Groovy Series is part of the Grails Podcast and can be subscribed to via: http://hansamann.podspot.de/rss. The series is produced by Dierk König and Sven Haiges, further information about the topic of this episode can be found in the book

Groovy in Action - http://groovy.canoo.com/gina

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: adaptives on February 5, 2009

Hmmm interesting.

I changed line 41 to have one more group in the regex, and the code failed at runtime. Then when I added another parameter to the closure, it worked. The number of parameters expected in the closure are num_groups + 1. We need one more for the 'all' (which I guess must be holding all the groups of that match).

Thanks for the tutorial.

You need to login to post a comment.