Find and Replace
/ Use Regular Expressions
/ Replace All
: reference groups are NOT handled correctly #7503
Open
Description
opened on Oct 30, 2024
Description
On Find and Replace, using Regular Expressions, using Replace All,
reference groups are NOT handled correctly.
Reproduce
- Create a Jupyter notebook.
- Type in the first cell:
{
'var1': 123,
'var2': 456,
}
- Open the
Find and Replace
dialog. - Roll out the
Replace
part. - Click the
Use Regular Expressions
button. - Type:
: (\d+),
at theFind
input. - Type:
: $1+1,
at theReplace
input. - Click the
Replace All
button. - Expected cell content:
{
'var1': 123+1,
'var2': 456+1,
}
- Actual cell content:
{
'var1': $1+1,
'var2': $1+1,
}
At the same time, the Replace
-button single replaces work as expected.
Expected behavior
On Find and Replace, using Regular Expressions, using Replace All,
reference groups are handled correctly.
Context
- Operating System and version: Calculate Linux (Gentoo-based)
- Browser and version: Chromium 129.0.6668.100, 64 bit
- Jupyter Notebook version: 7.2.2
Activity