Groups | Search | Server Info | Login | Register


Groups > comp.compilers > #141

Inverse grep

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.linkpendium.com!news.linkpendium.com!news.iecc.com!nerds-end
From glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups comp.compilers
Subject Inverse grep
Date Wed, 8 Jun 2011 23:01:57 +0000 (UTC)
Organization A noiseless patient Spider
Lines 12
Sender news@iecc.com
Approved comp.compilers@iecc.com
Message-ID <11-06-015@comp.compilers> (permalink)
NNTP-Posting-Host news.iecc.com
X-Trace gal.iecc.com 1307814794 59388 64.57.183.58 (11 Jun 2011 17:53:14 GMT)
X-Complaints-To abuse@iecc.com
NNTP-Posting-Date Sat, 11 Jun 2011 17:53:14 +0000 (UTC)
Keywords question, comment
Posted-Date 11 Jun 2011 13:53:14 EDT
X-submission-address compilers@iecc.com
X-moderator-address compilers-request@iecc.com
X-FAQ-and-archives http://compilers.iecc.com
Xref x330-a1.tempe.blueboxinc.net comp.compilers:141

Show key headers only | View raw


I suppose this is a strange question, but I was wondering if
there was ever something like an inverse grep.  That is,
match a string against a file full of regular expressions.

Now, one could just read the file, compile the regex one at
a time, and do the match, but maybe there is another way.

-- glen
[If you want to know which pattern it was, there's flex which turns all
the patterns into one DFA with tags to know which one it was, or else
there's the perl "study" operator which pre-scans a string to make its
NFA matcher faster on subsequent runs against the same string. -John]

Back to comp.compilers | Previous | NextNext in thread | Find similar


Thread

Inverse grep glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-06-08 23:01 +0000
  Re: Inverse grep Chris F Clark <cfc@shell01.TheWorld.com> - 2011-06-12 14:16 -0400
    Re: Inverse grep Tony Finch <dot@dotat.at> - 2011-06-13 17:48 +0100
  Re: Inverse grep torbenm@diku.dk (Torben Ægidius Mogensen) - 2011-06-14 11:16 +0200
    Re: Inverse grep anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-06-15 12:28 +0000
    Matching very large patterns, was Re: Inverse grep Chris F Clark <cfc@shell01.TheWorld.com> - 2011-06-19 21:45 -0400
      Re: Matching very large patterns, was Re: Inverse grep glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-06-20 04:52 +0000

csiph-web