[cs615asa] Green Team - Week 9

Chengzhi Yang cyang32 at stevens.edu
Mon Apr 1 16:47:33 EDT 2019


Hi Everyone,

This is the Green team. Regex is one of tonight's topic. In generally, regex usually has the small target strings to find and will not have performance problems. But in some rare case Regex may have a performance problem in small strings.

The author introduced one of Regxp develops/debug tool RegexBuddy. http://www.regexbuddy.com/. He debugged his expression on this tool. And no problem happened. Because the RegexBuddy has an advanced regular expression engine. And the expression encounters the problem in the .NET environment. It has an exponential time increase. And it took 25657 ms on the very small string(25 chars).

And the author of RegexBuddy calls this issue: catastrophic backtracking. And he described and gave out of a solution in this article: https://www.regular-expressions.info/catastrophic.html "The solution is simple. When nesting repetition operators, make absolutely sure that there is only one way to match the same match. "

Reference:
https://blog.codinghorror.com/regex-performance/
https://www.regular-expressions.info/catastrophic.html
http://www.regexbuddy.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs615asa/attachments/20190401/a33937b3/attachment.html>


More information about the cs615asa mailing list