In its simple search mode, wagrep searches for either
a
substring match to the required text, so that Bra
matches Braham
, or a word match, in which case
the matched string must be a separate word (i.e. Braham
no longer matches Abraham
).
Searches are then made
more powerful by wagrep's best match capability.
When turned on (can be turned off by selecting exact match),
the program will find the closest match to your string, within a specific
number of errors (generally with a default of three). The latter
allows things like Brayham
to find Braham
.
For anything more complicated we have advanced mode, which can also be used with exact or best match (and can be a substring or word match).
Stephen|Steven
, which will match either word.
J[aeiou]sup
, to
match Jasup
, Jesup
and so on.
S[a-c]
matches Sa, Sb
and Sc
.
Fr.d
will match Fred
, Frod
and
so on.
Berg?stein
will match Berstein
and
Bergstein
.
Bo*ld
matches Bld, Bold, Boold
etc. You
can use "+" in the same way if you want at least one occurence
(Bld
wouldn't match). ".*" matches anything, but we
recommend using "#", which is faster (i.e. Br#am
will
match Braham
).
(Braham|Goode).*(Stephen)
will give you
the e-mail addresses of myself and Stephen Goode (surnames come first).
Smith;John
only finds John Smith
. On the other hand,
"," is the or operation, so that Smith,John
finds all the Smith's and John's in the file. They cannot
be combined in the present version.