semgrep icon indicating copy to clipboard operation
semgrep copied to clipboard

Named capture groups in `fix-regex`

Open iuliadmtru opened this issue 6 months ago • 0 comments

Is your feature request related to a problem? Please describe. It would be nice to have named capture groups in fix-regex. This might be related to #3269, but it's not the same thing.

Describe the solution you'd like Something like this: https://semgrep.dev/playground/s/4b5EZ.

Describe alternatives you've considered The same result can be achieved with regular capture groups (but not as nice, especially then you have multiple capture groups).

Use case Sometimes it can be helpful to be able to reference a capture group by name instead of number in a replacement. It is much more clear.

iuliadmtru avatar Aug 17 '24 13:08 iuliadmtru