Word and Text Replace

Replaces text with other text.

< Feedback op Word and Text Replace

Vraag/Reactie

guyRickyMaker
§
Geplaatst: 05-06-2019

Slow Regular Expressions

Certain regular expressions may cause the script to run quite slowly such as my bad example of /(.\W?)*/i. This regular expression and others like it may match lines and lines of text instead of just a short word or phrase. What could be done instead is to use the rule /./i, make the "replacing text phrase" unique such as "delete all", and add a conditional that changes the matched text to something else that isn't "delete all". I'll add a console message on the run time of the script for reference if you'd like to see how long it takes to run.

Reactie plaatsen

Log in om antwoord te geven.

长期地址
遇到问题?请前往 GitHub 提 Issues。