Option 'e' --> Output Embedded Matches. Normally QTGrep
outputs
only the first match found. QTGrep also has the capability of finding
matches
to multiple regular expressions embedded within an on-going match. For
example,
consider the contrived case of the following two expressions:
init_(tags)
n(it_t)
In scanning for matching strings, QTGrep will start matching the first
expression
first. As input scanning continues, QTGrep also matches the
second
expression while continuing the on-going first match. When the string
match
for the second expression is completed, the on-going match for the
first
expression is continued. When the match for the first expression is
completed.
The result is output. If this option is toggled on, then the match for
the
second expression is also output. If invoked with the 'M' and 'I'
options,
qtgrep -ReMIT -f testfile.exp testfile.txt
the output would be similar to that below:
1E: 17I/ 9L: 3R: init_tags
1E.1L.1C->22I/4L: tags
2e: 18I/ 5L: 3R: nit_t
2e.1L.1C->19I/4L: it_t
1E: 6I/ 9L: 14R: init_tags
1E.1L.1C->11I/4L: tags
2e: 7I/ 5L: 14R: nit_t
2e.1L.1C->8I/4L: it_t
Note the use of case, 'E' or 'e' to distinguish the primary and
embedded
match. The use of the 'D' option can be used to further highlight which
expression
has been matched in the context of the record.
Note that this option is only active for matching against regular
expressions.
Embedded keyword matches will not be found or reported. The 'R' option
may
be used to force the regular expression match mechanism if desired.
This is a local option and may be turned on or off for separate files
as
desired.
The corresponding long option is: --embedded-match=(on|off)
Incompatible Options Are:
W
|
Write Compiled Search Patterns
|
Z
|
File Preview
|
© Terry D. Boldt 1997-2005
All Rights Reserved
Last Updated: Nov. 26, 2005