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

Support capture groups for smart renaming #29

Open
dantechguy opened this issue Aug 16, 2023 · 1 comment
Open

Support capture groups for smart renaming #29

dantechguy opened this issue Aug 16, 2023 · 1 comment

Comments

@dantechguy
Copy link

dantechguy commented Aug 16, 2023

Unless I'm being silly, I don't think it's possible to rename the first space (" ") character in a title with a hyphen ("-") for example - as any capture which anchors to the start of the string will mean that from the start of the string is replaced.

I then guessed that perhaps this plugin allowed you to use capture groups to smart replace, so my above scenario might be solved by:

Capture: ^(?<start>[a-zA-Z0-9]*)

Replace: ^\k<start>-

This also didn't work, hence I'm suggesting it here! If my understanding of regex is correct I imagine it should be fairly straightforward to implement.

Thank you!
Dan

@mlazzarotto
Copy link

Look at #20. You have to use a different kind of capture groups.

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