A regular expression pattern matching processor for APL
Mark R. Dempsey, Leslie H. Goldsmith · ACM SIGAPL APL Quote Quad · 1981
Regular expressions are a powerful notation for expressing text patterns. This paper discusses classical regular expressions and their extension into the domain of APL. These extensions are manifest in terms of locator templates, which describe patterns to be searched for, and action templates, which specify an action to be performed when a match is encountered. An algorithm for implementing these concepts is briefly discussed. The algorithm compiles a template into code which is then interpreted in the context of a specific text vector to be searched. Numerous examples are espoused to demonstrate the utility of pattern matching over a wide range of problems.