Word and Text Replace

Replaces text with other text.

< 脚本Word and Text Replace的反馈

提问/评论

guyRicky作者
§
发表于:2019-06-05

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.

发表回复

登录(不可用)以发表回复。

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址