Skip to content

Find and Replace / Use Regular Expressions / Replace All: reference groups are NOT handled correctly #7503

Closed
@kuraga

Description

@kuraga

Description

On Find and Replace, using Regular Expressions, using Replace All,
reference groups are NOT handled correctly.

Reproduce

  1. Create a Jupyter notebook.
  2. Type in the first cell:
{
    'var1': 123,
    'var2': 456,
}
  1. Open the Find and Replace dialog.
  2. Roll out the Replace part.
  3. Click the Use Regular Expressions button.
  4. Type: : (\d+), at the Find input.
  5. Type: : $1+1, at the Replace input.
  6. Click the Replace All button.
  7. Expected cell content:
{
    'var1': 123+1,
    'var2': 456+1,
}
  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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions