[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep - Which regular expression matches?
From: |
Sven Hartrumpf |
Subject: |
grep - Which regular expression matches? |
Date: |
Fri, 04 Apr 2003 15:15:21 +0200 (CEST) |
Hi all.
I produce medium-sized sets (50 - 500) of regular expression that I want
to match over a large (200000 documents with around 10 KB each)
text collection on a hard disk.
For efficiency reasons, I run only one grep command with lots of -e options
over the text collection.
So far, so good.
Besides the information which texts match I want to know _the (first)
regular expression producing the match_.
1. Can I do this with grep?
(O.K. a complicated way would be to get a text match first, and then
try one by one each regular expression on the matching part (using
--only-matching option from recent grep versions) of the text.)
2. Is another tool more useful for this?
(Time efficiency is important.)
Thanks in advance
Sven
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- grep - Which regular expression matches?,
Sven Hartrumpf <=