The search phrase used in the contains field of the search dialog, can consist of one or more words as well as wildcard characters or logical operators. If more than one word is given and no logical operators are used, only files containing all of the words will be listed.

Wild Card Characters

? - When a question mark is used in a word, it matches any single character in that position. Thus ?at would match cat, bat, hat etc.
* - When an asterisk character is used in a word, it will match any number of characters, including none, at that location. Thus *at would match at, what, cat, bat etc. Note that this is not a regular expression *, but rather the equivalent of .* in a regular expression. You can use regular expression syntax by checking the box to the right of the contains field.

Logical Operators

Note that except for the one section discussing quoted search phrases, the quote marks in the examples are not part of the search phrase.

If two or more words are listed and they are not separated by a logical operator, Wilma will only list those files that contain all of the words. In other words, Wilma will perform a logical AND if no other operator is present. Thus the search phrase airline travel would list only files containing both words.

| - If two words are separated by the | symbol (a vertical bar), then Wilma will list any file that has either of the words in it. Here Wilma is performing a logical OR. The search phrase airline | travel would list all files containing either word.

^ - If a word is preceded by the ^ symbol, Wilma will NOT list any file which contains that word. The search phrase airline ^travel would list files which contained the word airline, but did not also contain the word travel. Note that this actually behaves more like a binary operator and so there must be something to the left of the NOT term. For instance ^travel airline would not return anything since the ^travel would remove any files containing travel from the existing results, which are empty. This empty set would then be ANDed with the set of files containing airline and the result would of course still be empty.

() - In the absence of parenthesis, Wilma evaluates an expression from right to left. Thus the expressions:

red blue | green

red ( blue | green )

are equivalent and would list all files that contained red and either green or blue or both. The expression:

green | red blue

would find all the files that had green or both red and blue in them and is equivalent to:

green | ( red blue )

Parenthesis can always be used to ensure the correct ordering of search operations.

You can use logical operators when the regular expression box is checked, but spaces are not allowed in the regular expression and all operators, including parenthesis, must be separated from the regular expression by a space. Each regular expression matches against a single word, not a group of words (the ^ and $ operator refer to the beginning and end of the words). Thus you could have something like:

^r\w*d$ | ^gre*n$

as a legitimate phrase.

Proximity Operators

Note: proximity operators do not work with regular expressions.

To minimize the size of its indexes, Wilma does not keep word position information them, which means Wilma cannot use its index to determine which files contain words in close proximity to each other. However Wilma does still provide a mechanism for proximity searching.

Near operators are interpreted as simple AND operators for the purpose of initially selecting files.  Wilma then scans the contents of these files to eliminate any not meeting the near criteria.

The near operators and their functions are listed below. Note that if an operator is immediately followed (no spaces) with a number, then that number defines how many words can separate near terms. If no number is present, then 8 is used as the default. A value of 1 would mean the words are adjacent. And

Santa <20 sleigh

will only highlight occurrences of ‘Santa’ that are followed within 20 words by 'sleigh'.

< - The < symbol is used to designate that the second word must be present within a certain number of words of the first word.
> - The > character indicates the after operator. The phrase Santa >20 sleigh is equivalent to sleigh <20 Santa.
: - The : character is the near operator. It combines the meanings of the < and > operators and highlights any occurrence of the two words that are near each other. The phrase Santa :20 sleigh is equivalent to (Santa <20 sleigh) | (Santa >20 sleigh)
" " - Enclosing a string in quotes is the same as separating each word in the string by a <1 operator. Thus the phrase “one fine night” including the quotes is equivalent to the unquoted string one <1 fine <1 night. Both will only highlight the word one when it is immediately followed by fine which is in turn immediately followed by night.

Note that the near operators will not work correctly with compound arguments (i.e. in parenthesis). Thus

(travel | time ) < huxley

would have to be written as

(travel < huxley) | (time < huxley)

to work properly.

At this time only the < operator will work in series. That is

tom < thumb < pie

will work as expected, but

tom : thumb : pie

will not.

Only Highlighting Some Words

If a search phrase word is preceded by the + character, then that word will be used in determining the files found, but occurrences of the word will not be highlighted in the contents frame. If the contents frame is in outline mode, lines containing this word will not be shown unless they also contain some other search phrase word.

The phrase airline +travel would only list files containing both airline and travel, but only airline would be highlighted when the files were viewed.

Halting a Search

Note that while whole word searches are very fast, very general wildcard searches and proximity searches can take a while. Clicking on the Stop button on the tool bar will attempt to halt a search, but the halt may not be immediate.