// Given some regular expression (?<capture_group>...)...(?<another_capture_group>...) // You can reference them in your replace by using $1, $2,...