Make the regular expression as simple as possible. Complex expressions take longer to process or match than simple expressions.正则表达式应尽量简单。与简单表达式相比,复杂表达的处理或匹配需要更多时间。• Avoid the use of .* if possible because this expression matches everything zero or more times and may slow processing of the expression. For instance, if you need to match all of the followingindex.html, index.htm, index.php, index.aspx, index.py, index.cgiuseindex.(h|p|a|c)+.+notindex.*如果可能,请避免使用 .*,因为此表达式与任何内容都匹配,会降低表达式的处理速度。例如,如果需要匹配 index.html, index.htm, index.php, index.aspx, index.py, index.cgi,请使用index.(h|p|a|c)+.+而不要用inde
...
继续阅读
(10)