CD-ROM Book Search Help
Copyright © 1996, 1997 Addison Wesley Longman.
Preindexed and Exhaustive Searches
You can search for a term by either using a pre-generated index of
words in the book, or by dynamically searching all the HTML files.
The first type of search is a preindexed search and the second
is an exhaustive search. Either search mode can be selected from
the checkboxes on the search window.
A preindexed search will generally take at most a few seconds because it
searches a much smaller number of words. The length of an exhaustive
search will vary depending on the speed of your computer, your hard drive
and the Web browser you're using. If a preindexed search does not find
what you're looking for, you should try an exhaustive search.
Search Terms
There are three different kinds of expressions you can search for,
which can be selected from the checkboxes on the search window:
- Word
- Substring
- Regular Expression
All searches are case insensitive. A word search only looks for exact
matches of a word. A substring search tries to find a search term within
part of a word. A regular expression search tries to match a regular
expression exactly to a word. Preindexed word searches support three
boolean expression operators: and, or, andnot.
Substring searches and exhaustive searches only support the or
operator. Regular expressions do not support boolean expressions, but
you can use the regular expression alternative operator, |
,
to simultaneously search for multiple regular expressions.
Word Search
A word search only looks for exact matches of a word. If multiple words
are entered, separated by whitespace, they are treated as though they're
all operands of boolean and. In other words, only results containing
all of the words are returned. This only applies to preindexed searches.
Exhaustive searches look for results containing any one of the words, a
boolean or, although there is one exception. When you perform an
exhaustive word or substring search you may enter a phrase in quotes to
find that exact phrase somewhere in the text. This is not possible in
the preindexed search because only individual words are indexed and not
entire phrases.
Boolean Expressions
When performing a preindexed word searches, you can use boolean expressions
to augment your search. The following operators are supported:
- and
- look for results containing all terms
- or
- look for results containing at least one of the terms
- andnot
- omit results containing these terms
For example, if you wanted to find all results containing objects
and distributed, but not programming, you would enter:
objects and distributed andnot programming
Substrings
A substring search tries to find a search term within part of a word.
So obj would match objects, objective, and
objects. If you enter multiple substrings, words containing
any one of the substrings are matched. So a search for: obj ing
would match objects, objective, and objects, but
also programming, typing, etc.
Regular Expressions
A regular expression search tries to match a regular expression exactly
to a word. There are may different regular expression syntaxes, but
today the Larry Wall's, Perl 4 regular expression syntax is the most
common on the Internet, and therefore the syntax supported. Perl 4
regular expressions are close cousins to egrep extended regular expressions
with a few differences.
The following Perl 4 regular expression features are supported:
- Alternatives separated by |
- Quantified atoms
- {n,m}
- Match at least n but not more than m times.
- {n,}
- Match at least n times.
- {n}
- Match exactly n times.
- *
- Match 0 or more times.
- +
- Match 1 or more times.
- ?
- Match 0 or 1 times.
- Atoms
- regular expression within parentheses
- a . matches everything except \n
- a ^ is a null token matching the beginning of a string or line
(i.e., the position right after a newline or right before
the beginning of a string)
- a $ is a null token matching the end of a string or line
(i.e., the position right before a newline or right after
the end of a string)
- Character classes (e.g., [abcd]) and ranges (e.g. [a-z])
- Special backslashed characters work within a character
class (except for backreferences and boundaries).
- \b is backspace inside a character class
- Special backslashed characters
- \b
- null token matching a word boundary (\w on one side
and \W on the other)
- \B
- null token matching a boundary that isn't a
word boundary
- \n
- newline
- \r
- carriage return
- \t
- tab
- \f
- formfeed
- \d
- digit [0-9]
- \D
- non-digit [^0-9]
- \w
- word character [0-9a-z_A-Z]
- \W
- a non-word character [^0-9a-z_A-Z]
- \s
- a whitespace character [ \t\n\r\f]
- \S
- a non-whitespace character [^ \t\n\r\f]
- \xnn
- hexadecimal representation of character
- \cD
- matches the corresponding control character
- \nn or \nnn
- octal representation of character
- \0
- matches null character
- Any other backslashed character matches itself
Search Results
After you enter your search query and press enter or click the Search
button, a list of results appear. The results are displayed as section
headings by default. A section is either the title of the HTML page, or
the title of the page, followed by the section title of the part of
the page satisfying the search query.
You can choose to display your results as sections, URL's, or both from
the choice menu at the bottom left. Looking at the URL's is useful when
you want to know exactly what file a result is in.
Clicking the Show button or double clicking on a list entry will
display the parts of the HTML pages containing your results in your Web
browser. If the files are not installed properly, you will get
an error message.