He listed the following new methods:
- eachMatch(Pattern pattern) { fullMatch, group1, ... -> ... }
- find(String regex)
- find(String regex) { fullMatch, group1, ... -> ... }
- find(Pattern pattern)
- find(Pattern pattern) { fullMatch, group1, ... -> ... }
- findAll(String regex)
- findAll(String regex) { fullMatch, group1, ... -> ... }
- findAll(Pattern pattern)
- findAll(Pattern pattern) { fullMatch, group1, ... -> ... }
In other words, the find/findAll methods now accepts a regular expression and the matching groups are passed to the closure.
Thanks for the patches, Ted.
1 comment:
You're welcome, I hope others will get as much use out of it as I will :).
Post a Comment