Testing of the regular expression is important, but profiling, optimization and proper understanding are critical. In the modern regex flavours is pretty easy to create regex which turns in infinite. Exactly like infinite loops in high level languages, regular expression could be infinite. Most important about runaway expressions is that their behaviour depend on the input string. For different input data it could find matches but it could be turn in infinite.
Regexter helps profiling the JavaScript regexps. It shows the steps needed by the engine to find match or steps needed for successful fail. If you write expression with runaway backtracking you will have "Too much backtracking" output in the debug. You must not use such an expression in the production code. Change the expression to one which successful fail or find matches.
The other goal of the regexter is the developers to have better understanding of the regular expressions in general and how they work internally.
Also the comprehensive debug will help regexp exprerts to write more optimized regexps.
It is build on the top of BESEN JavaScript engine. The BESEN provides comprehensive core dump of the regexp matching. The client JavaScript turns the debug in human readable format.
- Benjamin Rosseaux aka Bero the BESEN author.
- RegexBuddy - excellent tool by Jan Goyvaerts.
- Regular-Expressions.info - Regular Expression tutorials by Jan Goyvaerts.
- Steven Levithan - for his excellent posts about regexp performance and how the engine works internally.
LGPL v.3
Asen Bozhilov