Searching with the Grep Search Engine
Searching in the NASIS web site is done with the UNIX utility egrep.
In contrast with other search engines you may have used on the Web,
when you enter a search keyword you are actually entering a match pattern
for egrep. It will try to find an exact match for your pattern, unless you
use wild card characters in the pattern. It will also treat upper and lower
case letters as equal, unless you toggle off the Case Insensitive button.
The wild cards that you may use with egrep are different from the ones
you may be used to in NASIS. A complete explanation can be found in the
UNIX manual pages for egrep(1) and regexp(5). The most important ones are:
- period (.) matches any single character.
- asterisk (*) following a wild card matches zero or more
repetitions of the pattern matched by the wild card. In particular, the
combination .* matches anything.
- brackets ([]) surrounding one or more characters matches any
one of the characters in the brackets. A hyphen (-) can be
used to list a range of characters; for example [0-9] means the same
thing as [0123456789]. This can be combined with the asterisk, so
that [0-9]* matches any sequence of zero or more digits.
When the caret (^) is the first character inside brackets, the
pattern matches any character except those listed in the brackets. For
example, the pattern help[^-] matches any word containing "help"
as long as it is not followed by a hyphen.
- backslash (\) is used to remove the special meaning of any of
grep's wild card characters, so that they can be matched. If you want to find
any of the following characters in a search, the special character must
be preceded by a backslash: . * [ \ |
- To match only a complete word, not a part of a word, enclose your
pattern between the symbols \< and \>. So the pattern
\<help\> would match "help" but not "helpless".
- pipe (|) means "or", and will match any of the patterns
separated by pipe symbols. Don't put spaces around the pipe unless they are
supposed to be part of the pattern. For example, the pattern
soil data would find files containing the phrase "soil data",
while the pattern soil|data would find files containing either
of the words "soil" or "data".