Xcode 9 regex replace capture groups do not interpolate

Originator:amcknight2718
Number:rdar://32827938 Date Originated:6/16/17
Status:Closed as Duplicate Resolved:
Product:Xcode Product Version:9b1(9M136h)
Classification:Bug Reproducible:Always
 
Summary:
When using capture groups in regular expressions, those groups should be interpolatable in the replace text using $1, $2, ..., $n. Xcode 9 does not interpolate them in the source editor's search/replace (⌘ ⌥ F). The Find navigator's replace does still perform the interpolation.

Steps to Reproduce:
Try to use a capture group with regular expression search/replace in the source editor (not the Find navigator).

Expected Results:
Expect the captured matching patterns to be written back into the source editor upon replacing.

Observed Results:
The capture group interpolator symbols ($1, $2, etc) are written in place of the matched patterns.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!