Re: multiple-string matching & regular expressions



In article <1138212299.439248.19670@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
luseng <SevilSen@xxxxxxxxx> writes
>Hello,
>I am looking for an efficient multiple-string matching algorithm. But,
>the set of strings can contain both literal strings and regular
>expressions. Is it possible?
>thanks..
>
Theoretically, if e1 and e2 are regular expressions, then (e1 | e2) is
also a regular expression. But I have no idea if that leads to a
practical solution, and the answer may depend on what your regular
expressions and your input data are like anyway. Aho-Corasick is
practical but caters only for multiple literal strings.

Depending on your input data and regular expressions, one way to apply
this would be to compute a set of literal strings such that any regular
expression match implies a literal string match, and use this as a
coarse filter to pick out bits of interesting input.

For much better but more detailed info see e.g. section 5.5.1/ P 126 and
later of "Flexible Pattern Matching In Strings" by Navarro and Raffinot.
--
A.G.McDowell
.



Relevant Pages

  • multiple-string matching & regular expressions
    ... I am looking for an efficient multiple-string matching algorithm. ... the set of strings can contain both literal strings and regular ... expressions. ...
    (comp.theory)
  • Re: Regualar Expression Theory
    ... Alan Turing 1950 ... > Model of Computation and Formal Languages, Oxford University Press, ... Are these references related to regular expressions? ...
    (comp.unix.shell)
  • Re: Regular expressions for replacements in Excel?
    ... The Word wildcards seem to be much more limited than real regular ... expressions, so I had already eliminated that option. ... or not it ended in the slash that I intended to require. ... since I think that one of the later transformations is ...
    (microsoft.public.word.vba.general)
  • Re: Regular expressions for replacements in Excel?
    ... The Word wildcards seem to be much more limited than real regular ... expressions, so I had already eliminated that option. ... or not it ended in the slash that I intended to require. ... since I think that one of the later transformations is ...
    (microsoft.public.excel.programming)
  • Re: Regular expressions for replacements in Excel?
    ... The Word wildcards seem to be much more limited than real regular ... expressions, so I had already eliminated that option. ... or not it ended in the slash that I intended to require. ... since I think that one of the later transformations is ...
    (microsoft.public.word.vba.beginners)