OpenWindows Advanced User's Guide

6.7.2 Refining the Search

You can make searches more precise by tagging the string with indicators for the following characteristics:

To match the beginning of a line, start the search string with a caret (^). For example, to find the next line beginning with "Search", type:

/^Search

To match the end of a line, end the search string with a dollar sign ($). For example, to find the next line ending with "search.", type:

/search\.$

(Note that the period is escaped with a backslash.)

To match the beginning of a word, type \< at the beginning of the string; to match the end of a word, type \> at the end of the string. Thus, to match a word, rather than a string, combine the end-of-word and beginning-of-word tags in the search pattern. For example, to find the next occurrence of the word--as opposed to the string--"search", type:

/\<search\>

To match any character, type a period (.) in the string at the location to be matched. For example, to find the next occurrence of "disinformation" or "misinformation", type:

/.isinformation

Since this is a search for a string and not a word, this search pattern may also find such constructions as "misinformationalist" and "disinformationism".

To search for alternative characters in a string, enclose the alternatives in brackets. The search pattern /[md]string will find strings beginning with either m or d. On the other hand, /[d-m]string will find strings beginning with any letter from d through m.

To match zero or more occurrences of the last character, type an asterisk (*) in the string. You can effectively combine brackets and the asterisk to look for well-defined alternatives. For example, to find all strings beginning with a through z and ending with "isinformation" and to find all occurrences of the string "isinformation", type:

/[a-z]*isinformation