Premium
Extending regular expressions with context operators and parse extraction
Software: Practice And ExperiencePeer ReviewedKearns Steven M.1991Journals
Regular expressions are used in many applications to specify patterns because any regular expression can be compiled into a very efficient one‐pass pattern matcher called a finite automaton. Finding matches is useful, but even more useful is parse extraction, which describes in detail how a pattern matches some input. After matching an address, for example, parse extraction makes it easy to find out the Zip code part of the address. We present an elegant, efficient algorithm for extracting a parse after matching with a finite automaton. In addition, we extend the regular expression language to include new operators for matching arbitrary left context and single character right context. The extended language can be matched as efficiently as the usual regular expression language, but is more expressive. Finally, we suggest how to apply the matching algorithms to match regular expressions containing arbitrary right context and single character left context. In effect, this allows one to specify patterns that seem to require an unlimited amount of look‐ahead to match.
This content is not available in your region!
Continue researching from Zendy home
Having issues? Contact support