In a match found by a defined pattern, how to group various portions of a match?