Groovy loop through Pattern matches
def regex = ‘crt1234[a-z]_(\w\w)_DTS(.*)’ Pattern pattern = Pattern.compile(regex) Matcher matcher = pattern.matcher(“crt1234_DH_DTS”) matcher.findAll() How do I loop through the matches? When I try the following it throws an IllegalStateEx for(i in 1..<matcher.count) group += matcher.group(i) I am able to concat the groups using the following code matcher.findAll() { newGroup -> group += newGroup } design-patterns […]