Help on Constructing Search Patterns for Glimpse
Glimpse supports a large variety of patterns, including simple strings, strings
with classes of characters, sets of strings and wild cards.
Strings
Strings are any sequence of characters, including the special symbols ^ for
beginning of line and $ for end of line. The special characters:
$ ^ * [ , ( ) ! \
as well as the meta characters special to glimpse:
; , # < > - .
should be preceded by \ if they are to be matched as regular characters. For example,
\^abc\\ corresponds to the string ^abc\, whereas ^abc
corresponds to the string abc at the beginning of a line.
Note: To search for authors names with accent marks, please enter the
exact name or change 'Mispellings allowed:' to 1.
Classes of characters
A list of characters inside [ ] (in order) corresponds to any character from
the list. For example, [a-ho-z] is any character between a and h or
between o and z. The symbol ^ inside [] complements the list. For example, [^i-n]
denote any character in the character set except character i to n. The symbol
^ thus has two meanings. The symbol '.' (don't care) stands for any symbol (except
for the newline symbol).
Boolean operations
Glimpse supports an and operation denoted by the symbol `;' and an or
operation denoted by the symbol `,', but not a combination of both. For example,
pizza;cheeseburger will output all lines containing both patterns.
Wild cards
The symbol # is used to denote a sequence of any number (including 0) of arbitrary
characters. The symbol # is equivalent to .* in egrep. For example, ex#e matches
example.
Combination of exact and approximate matching
Any pattern inside angle brackets <> must match the text exactly even
if the match is with errors. <mathemat>ics matches mathematical
with one error (replacing the last s with an a), but mathe<matics>
does not match mathematical no matter how many errors are allowed.
This search facility utilizes the Glimpse search engine developed at the University of Arizona.
|