Find command (Home tab)

This command displays a dialog box for searching the document for the specified text.

The string to search for is specified in the Find what field. A single or multi-line string up to 20,000 bytes may be used. The user will determine which direction the search will be executed by pressing the Next or Previous button to initialize the search. In HEX mode, the search is performed in the direction specified with the Direction radio buttons. If the string is not found, the search wraps around to the other end of the file and continues the search. If the string is not matched a message indicating that the string is not found is displayed.

In addition to searching for printable characters, tab characters and newline (Carriage Return/Line Feed) characters may be searched for. To search for a Tab character, use "^t" characters in the dialog. To search for the newline characters, use "^p" characters for CR/ LF, "^n" for LF only and "^r" for CR only in the dialog. To search for a "^" character, use "^^" in the dialog.

Additionally, the characters "^s" will be replaced with any text that is selected when a find is executed and the characters "^c" will be replaced with the contents of the clipboard (up to 30,000 characters). This is useful particularly for macros. When recording a macro, the option exists to include a find of a specified character string, or using "^s" the macro records the "^s" and when replayed will determine the text selected at the time the macro is playing back, likewise when using "^c", these characters will be replaced with the contents of the clipboard at the time the macro is playing back.

Special character summary:

Symbol

Function

^^

searches for a "^" character

^s

searches for selected (highlighted) text when a macro is running

^c

searches for the contents of the clipboard when a macro is running

^b

matches a page break

^p

matches a newline (CR/LF) (paragraph) (DOS Files)

^r

matches a newline (CR Only) (paragraph) (MAC Files)

^n

matches a newline (LF Only) (paragraph) (UNIX Files)

^t

matches a tab character

Note - ^ refers to the character '^' NOT Control Key + value.

If the button is pressed the find history is displayed.

If the button is pressed the Favorites submenu with the following options is presented:

Add to Favorites

adds current item in combobox to Favorites list

Edit Favorites

presents Edit Find/Replace Favorites dialog where users can name favorite search strings, organize the list and remove items from the list

Favorites

presents submenu displaying the Favorites list. Strings may be selected from the list to populate the combobox

If the button is pressed a list of regular expression options appropriate to the selected regular expression engine is displayed. This button is subdued unless the regular expressions checkbox is selected.

To select all text between the cursor position and the search target, hold down the SHIFT key at the time the search is started with the Next button.

Count all

Clicking the Count all button will show the number of occurrences of the "Find what" string in the active file. This information is shown directly in the Find dialog, next to the gear icon.

In

The user may specify if the search should be executed in the Current file, Selected text or All open files in the In section and the replace will be limited to the specified area. If All open files is selected, pressing Next will automatically move focus to the first occurrence in the next open file.

Advanced Options

Pressing the button extends the Find dialog to display additional search options.

Match whole word

By default, the search will not be restricted to matching whole words only. This option allows the search to be restricted to whole words only. This is useful for searching for 'a', or 'A' without finding all words including 'a'. If a search has already occurred in a document, the default selection will match the previous search.

Match case

By default, the search will not be case sensitive. The option to make the search case sensitive is given. If a search has already occurred in the document, the default selection for case sensitivity is that of the previous search. This option also affects regular expressions. If this is not checked, [A-Za-z] and [A-Z] are equal to [a-z].

Regular expressions

If this option is selected the search will be executed using the regular expression type selected from the list below:

Perl

If this option is selected the editor will use Perl style regular expressions based on the Boost C++ Libraries.

UltraEdit

If this option is selected the editor will use UltraEdit style regular expressions.

Unix

If this option is selected the editor will use Unix style regular expressions.

For information regarding creation of regular expressions see Regular Expressions or Perl Regular Expressions help.

Highlight all items found

This option causes all items matching the search string to be highlighted (shown as selected text) when the Next button is pressed.

List lines containing string

This option causes UltraEdit to search for all occurrences of the string in the active document and to list them in a dockable Find String List window. Double-clicking on one of the result lines (or selecting it and clicking on Goto in the context menu) will position to that line in the file.

Close after find

If this option is selected, and a matching string is found when Next is pressed, the Find dialog is closed.

In column

If this option is selected the search will be restricted to the specified start and end columns. The number specified for the end column must be greater than the number specified for the start column (except when searching an entire line). To search an entire line, "0" and "-1" should be used. It is important to note that column numbering begins with "0" so the initial column value would have to be set to "0" to search from the beginning of a line.

If the editor active window is in Hex mode, an additional option exists:

ASCII

Check this option to search for a regular plain text string while in hex edit mode, just as you would while in plain text mode. If this option is set, only the ASCII representation column on the right is searched, and any matches are selected there.

Filter lines

If the Filter lines checkbox is selected, the Show and Hide radio buttons become active and control what text is displayed in the file after the search is completed. If the Show radio button is selected, only lines matching the specified search string will be displayed in the active file. All non-matching lines will be hidden using code folding. If the Hide radio button is selected, all lines matching the specified search string will be hidden in the active file using code folding.

Shortcut: ALT+F3 or CTRL+F, F