Exact word match:
If you search for "smith" you will find not only "smith" but any word
that contains
"smith" like "blacksmith" or "smithson". If you just want "smith"
look for "\bsmith\b".
\b = exact
Wildcards:
If you don't know how smith spelled his name (it could be "smyth" or
"smith").
look for "Sm.*".
.* = wildcard
OR:
If you can't remember if smith or jones is the author,
look for "smith|jones".
| = or
AND
For and and search - (look for Smith AND Jones) -
Use the .* wildcard like this: "smith.*jones".
(Note - 'smith.*jones' will not find 'Jones and Smith')
(word).*(word) = AND
Other stuff:
+ is used to indicate one or more occurrences of a letter. al+an would
match "Alan" or "Allan" (or even "Alllan" if it were in
there).
Parentheses can be used to limit the scope of an expression. \bcalcul(us|ate)\b
would match "calculus" or "calculate,"
but not "calculator" or "calculation."
Don't try to use the ^ (caret) or $ (dollar sign) to tie expressions
to the beginning or end of the field.
You can combine expressions to make your search more specific, but
be careful. Sometimes a regular expression doesn't
get interpreted the way you intended.
Back
to the search engine
Advanced Help with
Perl expressions