Lingo has two widgets that can be used for find and replace—Quick Find and Quick Replace. When opened, these widgets are integrated into the editor when looking for text in a file that is open. These widgets contain the same fields. The only difference between them has to do with which fields are initially shown when the widget is first opened. The Quick Find widget initially displays only the Find fields. The Quick Replace widget initially shows both the Find and the Replace fields.
Ribbon Select the Home ribbon. In the Find and Replace section select Quick Find.
Ribbon Select the Home ribbon. In the Find and Replace section select Quick Replace.
When you open the Quick Find widget, a field and some buttons appear in the upper-right corner of the editor.
In the Find field, enter the word(s) you want to find in the file that is open. As you type, the first instance of the term is highlighted, and a counter in the text field shows how many matches were found in the file.
You can click the down arrow in the field to select text used in recent searches.
To locate the next match, click . And keep clicking it to move through the file, finding each subsequent match.
If you want to replace matches with other text, click . This shows another field just below the first one. Enter replacement text in that field. If you want to replace only the next instance found, click . If you want to replace all instances of the matching text in the file with the replacement text, click .
Click to select any of the following filter options:
Regular Expressions If you select this option, you can use regular expressions when you look for content.
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.
Wildcards If you select this option, you can use wildcards when you look for content.
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.
To close the widget, click or press the Esc key on your keyboard.
The Quick Replace widget is identical to the Quick Find widget. The only difference is that the replace fields are displayed as soon as you select the option.