Actually uses index to select the capturing group. Searches take the index and use it to find the match. Then replacement replaces ONLY the captured group.