Action
Replace Multiple Spaces after Dot Example
Example script showing how to create a saved regular expression replace action. Edit the regular expression and replaceWith variables at the top to modify for different saved replacement function.
Steps
-
script
// define regex to use... const findRegex = /\.\s\s+/g; // /([A-Za-z]*) ([A-Za-z]*)/g; // define replacement expression... const replaceWith = ". "; //"$2 $1"; // do the replacement... draft.content = draft.content.replace(findRegex, replaceWith); draft.update();
Options
-
After Success Default Notification Info Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.