Skip to content

Incorrect regex pattern in regex_replace_posix_groups #19766

@shivbhatia10

Description

@shivbhatia10

Describe the bug

The regex_replace_posix_groups method should replace patterns like \4 with ${4} but it's using the pattern (\\)(\d*) instead of (\\)(\d+).

To Reproduce

I added a test in the fix PR which replaces some pattern with "\", currently this produces "${}" which is how I came across this bug.

Expected behavior

Should just replace the pattern with ""

Additional context

No response

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions