NR‐grep: a fast and flexible pattern‐matching tool
- 18 September 2001
- journal article
- research article
- Published by Wiley in Software: Practice and Experience
- Vol. 31 (13) , 1265-1312
Abstract
We present nrgrep (‘non‐deterministic reverse grep’), a new pattern‐matching tool designed for efficient search of complex patterns. Unlike previous tools of the grep family, such as agrep and Gnu grep, nrgrep is based on a single and uniform concept: the bit‐parallel simulation of a non‐deterministic suffix automaton. As a result, nrgrep can find from simple patterns to regular expressions, exactly or allowing errors in the matches, with an efficiency that degrades smoothly as the complexity of the searched pattern increases. Another concept that is fully integrated into nrgrep and that contributes to this smoothness is the selection of adequate subpatterns for fast scanning, which is also absent in many current tools. We show that the efficiency of nrgrep is similar to that of the fastest existing string‐matching tools for the simplest patterns, and is by far unmatched for more complex patterns. Copyright © 2001 John Wiley & Sons, Ltd.Keywords
This publication has 22 references indexed in Scilit:
- A guided tour to approximate string matchingACM Computing Surveys, 2001
- Very fast and simple approximate string matchingInformation Processing Letters, 1999
- A fast bit-vector algorithm for approximate string matching based on dynamic programmingJournal of the ACM, 1999
- A bit-parallel approach to suffix automata: Fast extended string matching1998
- Speeding up two string-matching algorithmsAlgorithmica, 1994
- Techniques for automatically correcting words in textACM Computing Surveys, 1992
- Fast text searchingCommunications of the ACM, 1992
- A new approach to text searchingCommunications of the ACM, 1992
- From regular expressions to deterministic automataTheoretical Computer Science, 1986
- A fast string searching algorithmCommunications of the ACM, 1977