Using the Search Option

When you select the Search ... option, the Find Message dialog window appears. You use the initial Find Message dialog window to perform a simple search for matching patterns in the message headers and body text. See the figure Find Message Window.

The procedure for conducting a simple search is described in Simple Search.

If you want to perform a more complex search, you can click the Complex search ... button to expand the search options. You can specify regular expression patterns, and you can search all the message headers and/or the message body. See Expanded Find Message Window and Complex Search.

The procedure for conducting a complex search is described below in Complex Search.

Figure: Find Message Window

Simple Search

To perform a simple search:

  1. Click the Search ... option to open the Find Message window.

  2. Enter the desired search string pattern in the Search string text field. The text field scrolls to the left to accommodate a lengthy string pattern.

  3. Click the one of the Find button to start the search.

    The search process looks for a pattern match in message headers and body text.

    • The Find Next button searches from the oldest message to the newest. Click it multiple times to find a sequence of messages matching the pattern.

    • The Find Prev button searches from the newest message to the oldest. Click it multiple times to find a sequence of messages matching the pattern.

    • The Find All button causes all messages matching the pattern to be selected.

NOTES:

  1. The Search string text field for a simple search is NOT case sensitive. If you enter the search string 401K meeting, for example, the search process will match 401k meeting, 401K Meeting, and so forth.

  2. You must enter enough characters to uniquely identify a word or string in the Subject: or From: or To: fields.

When you have completed the search, click the Done button, or click the Help button for more information.

Figure: Expanded Find Message Window

Complex Search

With the expanded Find Message window, you can construct search expressions that key on combinations of mail message elements, including:

A number of logical operators and comparative operators are also available to create ordered search expressions:

Constructing a search expression consists of entering a search string in one or more of the Find Message text fields and applying logical or comparative operators to the resulting expression. As you construct the expression, its elements are displayed in the search expression display field near the bottom of the expanded Find Message window.

The search expression display field contains a cursor that you can move in order to edit elements of the search expression.

Complex search strings are case sensitive. UNIX wildcard characters are legal. Syntax conforms to that of standard UNIX regular expressions.

Two sample procedures are shown below to illustrate how you Construct a Search Expression and how to Edit a Search Expression.

Constructing a Search Expression

To construct this example search expression, click the Search ... option to open the Find Message window.

Next, expand the Find Message window by clicking the Complex search ... button to the right of the Search string text field. The Find Message window expands.

In the expanded Find Message window, construct the example search string pattern as follows:

  1. Enter the string .*401K in the Subject text field and click the Subject button. (The syntax .* causes the search process to look for the term 401K anywhere in the Subject field.)

    The string Subject contains ".*401K" is displayed in the search string display field.

  2. Click the logical operator button labeled AND.

  3. The logical operator AND is added to the expression in the search string display field.

  4. Enter the name John in the From text field and click the From button.

    The string Sender contains "John" is added to the search string display field.

    The search string display field now displays the search expression:

    Subject contains ".*401K" and From contains "John" |
    
  5. Press the Find button to begin the search.

The search process first looks for a message that contains the string 401K anywhere in a Subject field. Then it checks the first four characters of that message's From field for the string John. If a match is found, the message is highlighted.

Search Editing Procedures

You can add, delete, or modify elements of the current search expression or you can click the Clear button to remove the current search expression from the display field in order to construct a new expression.

To edit any element (that is, any search string or operator) of an existing search expression, you move the cursor (vertical bar) to the appropriate location in the search expression and either insert new search elements or delete existing search elements.

To move the cursor:

To delete any element of a search expression:

To add (insert) a search string or operator anywhere in a search expression:

  1. Move the cursor to the location at which you want to add the new search string or operator.

  2. Click the button that controls the search string or operator that you want to add to the search expression.


TIP:
You can also enter the logical operators AND, OR, NOT, and the open and close parenthesis symbols (, ) from the keyboard by typing the characters "&", "|", "!", "(", and ")", respectively.

Editing a Search Expression

Assume you want to join the two search statements in the expression:

Subject contains ".*401K" and From contains "John" |

to form a compound statement connected by the logical operator OR, and that you want to limit the search to messages sent after May 10, 1995.

  1. Move the cursor to the left of the first search string element Subject contains ".*401K" in the search expression display field, then click the left parenthesis button [ ( ] to insert the left parenthesis character into the expression.

  2. Move the cursor to right of the logical operator AND. Press the Back Space key to delete the logical operator AND.

  3. Click the logical operator OR to insert it into the expression.

  4. Move the cursor to the right of the second search string From contains "John", then click the right parenthesis button [ ) ] to insert the right parenthesis character into the expression.

  5. Click the logical operator AND to insert it into the expression.

  6. Click in the Date text field and enter the date 5/10/95. Click the button just to the left of the Date text field and select the comparative operator > (greater-than).

  7. Click the Date button to insert the string Date is > 5/10/95 into the search expression.

    The edited search expression now states:

    (Subject contains ".*401K" or From contains "John") and Date is > 5/10/95|
    
  8. Press the Find button to begin the search.

The search process first looks for a message that contains either the string 401K anywhere in a Subject: field, or the string John at the beginning of any From: field. If a match is found, the search process then looks at the Date: field for that message. If the date is later than May 10, 1995, the message is highlighted.

When you have completed the search, click the Done button, or click the Help button for more information.


Preceding Section:
Selection and Status Options
Following Section: Message Pop-up Menu Options
Parent Section: Main Window Message Menu
Contents of Ishmail User's Guide