Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add named capture group support #34

Open
FreePhoenix888 opened this issue Jul 22, 2023 · 2 comments
Open

Add named capture group support #34

FreePhoenix888 opened this issue Jul 22, 2023 · 2 comments

Comments

@FreePhoenix888
Copy link

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
Copy link
Author

@ALMaclaine

@ALMaclaine
Copy link
Owner

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants