## Searches

- Search window

  - Calling up a search

  - Search location

Search methods

Using wild cards

Using regular expressions

Search results display

## Search window

### Calling up a search

OmegaT provides a powerful range of search functions. Call up the Search window with `Ctrl+F` and enter the word or phrase you wish to search for in the Search for box. Alternatively, in the Editor window, select a word or phrase in the editing field (target text of the active segment) and hit `Ctrl+F`. The word or phrase is entered in the Search for box automatically in this case.

Every call of the Search window creates its own new window. Do not forget to close them, so that they do not clutter your desktop.

### Search location

Searches occur both in the source as well as in the target section of the project. You may search in

- the project only (default setting)

- the project as well as in the reference translation memories in /tm/ (check Search TMs)

- a single file or a folder containing a set of files (check Search files)

when searching through files, OmegaT will restrict the search to files it can read (See Supported File Formats).

## Search methods

Select the method using the radio buttons. You can choose between two methods to search:

exact search | Search for segments containing of the string you specified.
keyword search | Search for segments containing all keywords you specified, in any order.

An exact search looks for a phrase, i.e. if several words are entered, they are found only if they occur in exactly the same sequence. Exact searches are similar to an "exact phrase" search in an Internet search engine such as Google.

Select keyword search to search for any number of individual words, separated by spaces and in any order. OmegaT will display a list of all segments in which all the words occur. Keyword searches are similar to a search "with all of the words" in an Internet search engine such as Google (AND logic).

For either of these two methods you can select the following three options:

case sensitive | The search will be performed for the exact string specified; otherwise capitals will be ignored.
regular expressions | The search string will be treated as a regular expression (in case of a keyword search it will be treated as multiple expressions).
search TMs | All translation memories are included in the search.

## Using wild cards

In both exact and keyword searches, the wild card search characters '`*`' and '`?`' can be used. To use wild cards, make sure the option regular expressions is not selected, otherwise these characters are interpreted as special regular expression characters.

- '*' matches zero or more characters. The search term 'run*' for example would match 'run', 'runs', and 'running'.

- '?' matches any single character. For instance, 'run?' would match 'runs' and 'rung', but not 'run' or 'running'.

If you wish to search for segments containing either * or ?, you will need to switch on regular expressions, and escape these characters by prefixing a backslash ('\') to them, i.e. 'x\*y' to find instances of 'x*y' and 'x\?`y`' to find instances of '`x?y`'.

## Using regular expressions

A regular expression search is a powerful way to look for instances of a string. It is similar to a wild card search, but allows far more flexibility. The regular expressions used in searches are those supported by Java. A short summary is available in the Regular Expressions Constructs appendix. If you need more specific information, please consult http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html.

You can find simple tutorials on the web (http://www.regular-expressions.info/quickstart.html, for example.)

## Search results display

Pressing the search button after entering a string in the search field will display all the segments in the project that include the searched string. As OmegaT handles all the identical segments as one entity, only the first unique segment is shown.

The segments are displayed in order of appearance in the project. Translated segments will be displayed with the original text at the top and the translated text at the bottom, non translated segments will be displayed in original text only.

Click on a segment to open it in the Editor for modifications. You may then switch back to Search window for the next found segment, for instance to control and if necessary adjust the terminology.

Legal notices | Home | Index of contents