This example shows how Ruby uses capture groups in regular expressions. We start with a text string and a regex pattern with parentheses marking capture groups. When we match the pattern against the text, Ruby returns a MatchData object. This object holds the full match and each captured group separately. We access these groups by index: matches[1] for the first group, matches[2] for the second, and so on. The example extracts the name and age from the string and prints them. Key points include understanding that parentheses define groups, groups are numbered by their order, and the match must succeed to access groups safely.