Categories


Popular topics

Shortcut: Ctrl+Shift+F

right Find in files allows you to search for a string in multiple files in a location of your choosing. The files don't have to be open in UltraEdit. The results of the search are written to the output window, unless you have checked the Results to edit window advanced setting. You can double-click results in the output window to open the file and immediately jump to the match location in UltraEdit.

Enter the string to search for in the Find what field, which allows a single or multi-line string up to 20,000 bytes.

In addition to regular characters and strings, the Find what field supports searching for several special characters and strings with special notation. For example, "^t" will match a tab. For a complete list of these values, see Special search characters. These special characters are valuable for matching non-printable text in files.

You can specify the search location(s) in the Directory field. This field may contain multiple search paths separated by semicolons, i.e.: C:\mydir1\; c:\mydir2\.

left Click the active file directory button to set the Directory field to the active file's parent directory. Click the ... button to open a folder browser where you can browse to and select your target search directory.


The In files/types field allows you to restrict the search to particular file types by extension. For example, to search only HTML and CSS files, you would use: *.html;*.css. If left empty, all files are searched.

If the Find string is left empty, UltraEdit will return a list of all file names matching the other search settings. This can be useful in generating a directory listing.

Use the In setting to set the search area to one of the following:

  • Files listed will search all files in the directory you specify, respecting the In files/types filter
  • Open files will search all files open in UltraEdit (the In files/types and Directory fields are ignored)
  • Favorite files will search only [Favorite files] (the In files/types and Directory fields are ignored)
  • Project files will search all files in the open project (this option is disabled if no project is open) (the In files/types and Directory fields are ignored)

left History button
This button displays a scrollable find history list.

left Favorites button This button opens the search favorites menu with the following options:

Add to Favorites adds current item in "Find what" field to Favorites list
Edit Favorites opens Edit Find/Replace Favorites dialog where you can name favorite search strings, organize the list and remove items from the list
Favorites opens sub-menu to select an existing favorite for the "Find what" string

leftRegular expressions help button
This button opens a short regular expression syntax reference for the selected regular expression engine. This button is subdued unless the regular expressions checkbox is checked.

Find
This button starts the find in files search. When find in files is running, the "Find / replace in files" option in the ribbon changes to "Cancel / replace in files." You can click this option to cancel the running search.

Advanced search options

Match whole word
This option forces the search to match whole words only. This is useful, for example, if you need to search for 'a', or 'A' without finding all words including 'a'.

Match case
This option forces the search to match the case of the "Find what" string exactly. This option applies to regular expressions as well.

Regular expressions
This option enables the use of regular expressions for the "Find what" string. There are 3 different types of regular expressions available:

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

Results to edit window
This option will write the results of the search to a new, unsaved file in UltraEdit, instead of the output window. This way, you can edit, save, or print the results. You can right-click on a result in the edit window to open the match/file from the context menu.

Match files / lines if string is not found

  • Setting this to Files will return as results all files that do not include the search string.
  • Setting this to Lines will return each individual line in results that do not include the search string, for all files searched. The files option only lists files that do not include the search string, but this option returns data on a line-by-line basis.

Search subdirectories
By default, only files in the top level of the search directory are searched. If this option is checked, all subfolders of the Directory field search location will be searched, not just the top level files.

Ignore hidden subdirectories
If this option is checked (along with search subdirectories), then OS-level hidden subfolders are not searched.

Open matching files
This option will open all files containing a match.

Subdirectories to ignore in search
You can exclude certain subdirectories by entering them here. For example, if you want to exclude any folder named ".git," simply type .git into this field. Separate multiple items with a semicolon, for example, .git;cvs.

File names/extensions to ignore in search
You can exclude file types or names from the search by entering them here. For example, if you want to exclude from the search all files with an extension of ".bak", simply type *.bak into this field. Or if you wish to exclude all files with names beginning with the string "index," you could type index* here (the asterisk acts as a wildcard). Separate multiple items with a semicolon.

Use encoding
Check this box to manually specify an encoding type UltraEdit should assume when opening files to search them. If this option is left unchecked (recommended), the search will use the default OS encoding for searching files unless a BOM is detected, in which case the encoding signaled by the BOM is used. If this option is checked, the options for are as follows:

  • Auto-detect will attempt to read the first 10 KB (approximately) of each file and automatically detect the encoding. Due to this additional step and processing, this may impact performance of the search.
  • Active file will use the active file's encoding for all files searched.
  • Beyond the above two options, you can manually set a specific encoding type to use for the search. The encoding type you select will be used for all files searched. This list is populated from the list of encodings your OS supports.

Please keep in mind that if an incorrect encoding is used for find in files, search results may be inaccurate or incomplete.

MediaWiki spam blocked by CleanTalk.