cuibonobo / joplin-plugin-note-rename

Joplin plugin to rename notes in bulk
Creative Commons Zero v1.0 Universal
5 stars 3 forks source link

Feature request: option to support full regular expressions #3

Open thomasleplus opened 1 year ago

thomasleplus commented 1 year ago

Hi,

First of all, thank you for creating this plugin, it is very useful to me.

As I am big fan of regular expressions, I created a fork for myself to leave my search and replace inputs unescaped, this way I can use pattern matching in the search string and reference captured groups in the replace string: https://github.com/thomasleplus/joplin-plugin-note-rename/commit/8e36b434171a4a8b1bdfb1077417bc1d475eca80

I am sure most users prefer literal search and replace but I was wondering if there is a way to have a configuration option in the plugin to give users the choice? This way I could use your plugin instead of maintaining my own fork.

I am not good enough at Typescript to create a PR for this and I don't even know if the Joplin plugin API supports some plugin configuration UI. But if you know and are interested in implementing this, I would appreciate it.

Thanks again,

Tom

cuibonobo commented 1 year ago

This is a great suggestion! I'll explore the possibility of adding a checkbox to the search & replace popup so that folks can choose one way or the other. I'll also explore how to add configuration options so that you can set whether your default is regex or not. It may take me a few weeks to get to this but I'll try to ship it in the next version.

thomasleplus commented 1 year ago

Let me know if I can help testing or something.