How to run a regex formula on the contents of a draft

This topic you started recently includes examples of running a regular expression for text substitution on the current draft.

See my first reply to you with the one line script and the subsequent script and action.

Effectively you want to get the draft content and then use a standard JavaScript function that is regular expression aware (such as the replace function for a string, which is what draft content is) on that.

1 Like