If you don't know how many matches you're going to make, I recommend trimming off as much as you can that isn't a match first (with another matcher, maybe), then using while(matcher.find()) to loop through the rest. If you need more help I'd be happy to look closer tonight after work, but the...