I’m using an existing action to take any line that starts with * and turns it into a task in GoodTask.
I want to create a final script to this action to find all * and replace with - [x] so it doesn’t dupe the next time and I know what’s already been sent to GoodTask.
I currently have this but it only does one line. Looking for it to look for all * in the note and replace
// define regex to use…
const findRegex = “*”;
// define replacement expression…
const replaceWith = “- [x]”;
// do the replacement…
draft.content = draft.content.replace(findRegex, replaceWith)/gm;
Any help appreciated.