Describe the bug
If you try to use a regular expression capturing group with Replace All, every instance will use the capturing group from the first instance, instead of each instance using it's own capturing group.
To Reproduce
Steps to reproduce the behavior:
Create a Markdown cell with the contents:
A find
B find
C find
D find
E find
Click Open find pane
Click to open Settings
Click to enable Regular expression setting
For Find enter: ([A-Z]) find
Click to open Replace
For Replace enter: $1 replace
Click the Replace All button
The cell now contains:
A replace
A replace
A replace
A replace
A replace
Expected behavior
I expect the cell to now contain:
A replace
B replace
C replace
D replace
E replace
Desktop (please complete the following information):
OS: Windows 10 Pro 21H2
Browser: Chrome Version 100.0.4896.127 (Official Build) (64-bit)
Additional context
Interestingly, if you click Replace Current repeatedly, instead of clicking Replace All once, then you get the expected result.
Describe the bug If you try to use a regular expression capturing group with Replace All, every instance will use the capturing group from the first instance, instead of each instance using it's own capturing group.
To Reproduce Steps to reproduce the behavior:
([A-Z]) find
$1 replace
Expected behavior I expect the cell to now contain:
Desktop (please complete the following information):
Additional context Interestingly, if you click Replace Current repeatedly, instead of clicking Replace All once, then you get the expected result.