Regular expression matching often used for searching and replacing strings are mostly implemented with backtracking. This causes that matching may not be completed in linear time in the length of a string. Previous works developed analyses to detect such regular expressions based on ambiguity analysis of nondeterrministic finite automata and growth rate analysis of string-to-tree transducers. We incorporate the techniques developed in the previous works and extend the analysis for extended regular expressions including lookahead and back-reference. We have also improved the core part of the analysis and implemented our analysis tool in Scala. It is shown that our tool can analyze more regular expressions than the existing tool of Weideman et al.
All Science Journal Classification (ASJC) codes
- General Decision Sciences