OlegLustenko / obsidian-bulk-rename

MIT License
72 stars 2 forks source link

Regex doesn't match and replace groups. #22

Closed Chriswaterguy closed 1 year ago

Chriswaterguy commented 1 year ago

I've tried matching groups, so that I can change the order of characters in my titles. E.g. if I want to move FOO from the start to the end, I might do Existing: FOO(.+) Replacement: $1FOO

But the preview shows no change.

I have also tried with \1 and \1 instead of $1.

cvh-obsi commented 1 year ago

see this thread (same request): https://github.com/OlegLustenko/obsidian-bulk-rename/issues/20

OlegLustenko commented 1 year ago

Well, I can work on it, Could you help me to add some specific cases so I can verify the results?

Since existing libraries have a different implementation of RegExp

cc: @cvh-obsi, @Chriswaterguy

Ideally, results will include -> Existing, Replacement

Chriswaterguy commented 1 year ago

Since existing libraries have a different implementation of RegExp

Could we have exactly the same flavour as the Obsidian search function? That would minimise confusion.

Thanks!

OlegLustenko commented 1 year ago

So, here is the Status update:

However, I'm working on making it work there too.

OlegLustenko commented 1 year ago

Ok, I made it work going to release it today or tomorrow!

Thanks everyone for feedback

OlegLustenko commented 1 year ago

Solved in the scope of https://github.com/OlegLustenko/obsidian-bulk-rename/pull/23

Feedback is welcome!

Released with 0.5.2 version

Thanks, everyone for contribution cc: @cvh-obsi, @Chriswaterguy

OlegLustenko commented 1 year ago

Closing as implemented