Capture regex groups for later use.