The Find and Replace in Files window pane lets you perform more advanced searches than the integrated Find and Replace widgets. You should use this window pane if you need to search for text in more than one file.
You do not need to have any files open in order to use this window pane to search for text.
Do one of the following, depending on the part of the user interface you are using:
Ribbon Select the Home ribbon. In the Find and Replace section select Find and Replace in Files.
Following are the options available in this window pane:
Use This is an advanced feature for users who are familiar with wildcard and regular expressions in searches. If you select this check box, you can specify whether the search will include wildcards or regular expressions.
A wildcard lets you substitute a single character for one or more other characters when searching for text strings. The most common wildcard characters are the question mark (?)—which represents a single character—and the asterisk (*)—which represents any combination of characters.
To use wildcards in the Find and Replace in Files window pane, enter the expression in the Find what field, select the Use check box, and from the drop-down choose Wildcards.
examples
Following are some examples of wildcards:
Wildcard Examples | Result |
---|---|
s*t | Finds "secret," "select," accessibility," and so on |
stand* | Finds "stand," "standing," standard," "stand-in," "outstanding," and so on |
gloss?.doc | Finds "glossy.doc," but not "glossary.doc" |
For more information about wildcards, see http://tinyurl.com/279p2nf.
Regular expressions (also referred to as regex or regexp) are similar to wildcards in that they let you find matching strings of text. However, they are more powerful than wildcards.
To use regular expressions in the Find and Replace in Files window pane, enter the expression in the Find what field, select the Use check box, and from the drop-down choose Regular Expressions.
When using regular expressions, backreferences are supported. For more information about backreferences, see http://www.regular-expressions.info/backref.html.
examples
Following are some examples of regular expressions:
Expression | Description |
---|---|
[a-z] | Matches any lowercase letter |
[A-Z] | Matches any uppercase letter |
\d | Matches any decimal digit |
\D | Matches any non-digit |
\s | Matches any white-space character |
{…} | Explicit quantifier For example, a{3} finds "aaa" |
| | Alternation For example, gray|grey finds "gray" or "grey" |
(…) | Logical grouping |
? | 0 or 1 of previous expression; forces minimal matching when expression might match several strings within a search string For example, reg(ular expressions?|ex(p|es?) finds "regular expression," "regular expressions," regex, regexp, or "regexes" |
For more examples and information about regular expressions, see the following:
http://www.regular-expressions.info/
http://regexlib.com/CheatSheet.aspx
Note: Lingo supports only .NET Framework regular expressions. For more information, see http://msdn.microsoft.com/en-us/library/hs600312.aspx.
Replace All Lingo replaces all of the matching text in all files included in the search. If matches are found in files that are already open, Lingo replaces the text in those files and "dirties" them (i.e., an asterisk is shown in the tab, indicating the file has been changed and needs to be saved). Therefore, you can undo the changes if necessary in each of those files or save them. As for files that are not already open in the user interface, Lingo does not open them at all. Instead, it simply replaces all of the matching text it finds and automatically saves those files. Therefore, you cannot undo those changes because the files were never opened.
If you tell Lingo to find all files containing certain text, the results are listed at the bottom of the interface in the Find Results 1 or Find Results 2 window pane, depending on which one you selected.
These window panes list the file name, context of the search term
Using the local toolbar, you can open the file for the selected row, the previous row, or the next row. You can also clear the table or save the results to a comma-separated value (CSV) file.
Note: If you are working with a multilingual project, the language selected in the File List is used for find and replace.