Finding and Replacing Codes and Styles
(See also: Edit: Find and Edit: Replace)
In order to find and replace DBT codes or styles, you must switch the DBT editor window to "Coded View." In this mode, DBT codes appear between square brackets and DBT styles appear between angle brackets. The shortcut to enter and exit Coded View is Alt + F3.
Imagine your editor window holds the following text.
I now want to skip two lines[sk2]
But I really meant three lines[>]
Finding and replacing DBT codes is similar to finding and replacing text with these additions. To enter a code in the "Text to find:" or "Replace with:" fields, press the F9 key first before you enter the code. You will observe that left and right square brackets appear with your cursor positioned between them for entering the code.
You may now enter the code you wish to find or replace.
Note that having typed a code, your cursor remains located between the square brackets. If you wish to find or replace some text in addition to the code, you must reposition your cursor outside the brackets before you begin typing text.
The example above would specifically look for the sk2 code followed by the word "But", to replace it with the code sk3 and the word "and".
Similarly, if you wish to find and replace a style, press Ctrl + F9. Please, note that many style names end with a period (full stop). If the style name has a period, it must be included when you search for or replace a style.
Additional option check boxes allow you to refine the process.
Case sensitive: I f you wish, for example, to replace the word "Braille" (capital B), with the word "braille" all in lower case, you need to check this box.
Backward Search: allows you to search from your current place in the document to the beginning.
Find whole words only: For example, you might wish to find "code", but not "codependence".
The Advanced options provide further flexibility.
When Find literal (or, in the Replace dialog, Replace literalis selected, DBT will find text, or codes, or a mixture of the two, exactly as you type it. When replacing, DBT will use the replacement text exactly as you've typed it.
When Find stylename (or, in the Replace dialog, Replace stylenameis selected, you may not include codes or spaces in the text you type. The text should be the name of style that may be used in the document. DBT will find places in the document where the style is used and, if replacing, re-tag that text to use a different style. The find and replace text must be only the name of a style, and, if applicable, must include the full stop character that DBT includes in the style name.
When Allow wildcard (*) at end of coded, DBT will find (and perhaps replace) text and/or codes just the way you type them, except in the case that a code ends with an asterisk, e.g. [fts~*]. Selecting Allow wildcard (*) at end of coded means that DBT treats the asterisk as a wildcard. It will match zero or more of any character. So [fts~*] will match [fts~], [fts~i], [fts~b], or even [fts~tomfoolery]. You may include a wildcard at the end of any code you type, and even at the end of more than one code, or at the of all codes. But you may only include one wildcard character per code, and it must be at the end. The same character in any other position must be matched to a literal asterisk. You can also include wildcards in replacement text, but again only one per code and only at the ends of codes. In this case, each wildcard in the replacement text will be equivalent to the text matched by the same wildcard in the text to find. For example, suppose you are replacing [lng~*][g1*] with [lnb~*][g1*]. Where DBT encounters the text [lng~es][g1u] and you opt to replace it, the result will be [lnb~es][g1u].
Tip: If you are unsure of a code, you can press the F5 key at any time to bring up a list of DBT codes. See also: Layout: Code List.