replace icon indicating copy to clipboard operation
replace copied to clipboard

Add named capture group support

Open FreePhoenix888 opened this issue 11 months ago • 2 comments

We can use number of captured group:

npx replace '(.+)' "\$1" test.txt

But we are not able to use named capture group:

npx replace '(?<name>.+)' "\$name" test.txt
# or 
npx replace '(?<name>.+)' "\${name}" test.txt

FreePhoenix888 avatar Jul 22 '23 07:07 FreePhoenix888

@ALMaclaine

FreePhoenix888 avatar Jul 22 '23 07:07 FreePhoenix888

@FreePhoenix888 I don't have any near term plans to improve the library. It was written rather poorly to begin with and there weren't adequate tests to ensure that any changes won't break other uses. This may change if I can get AI tools to figure out a good test suite.

ALMaclaine avatar Jul 22 '23 19:07 ALMaclaine