The Find & Replace dialog (in the Search menu, and also Edit>Find>Find & Replace) finds and replaces a word or phrase in the current field. The replacement will occur in all selected records (not just the current record). For example, you can use this dialog to replace every occurrence of Inc. to Incorporated, or every occurrence of Purchase Order to P.O.. This example will find every occurence of the word rd in the database and replace it with road (and since the Entire Words option is checked, the replacement will have the same capitalization). For a search string like rd, it is essential to specify the Entire Words option, otherwise an address like 27 Hardware Lane would be changed to 27 Haroadware Lane.

Note: No matter how many times rd appears in this field, every occurrence will be replaced. Even if rd occurs multiple times in a cell, all of them will be replaced.

Undo

It’s easy to make a mistake with the Find & Replace dialog that causes a potentially catastrophic change. Fortunately, the Undo command can undo any damage, just as with virtually all other Panorama commands.

Replace Options

The Option pop-up menu customizes how text is replaced.

Each option is described below.

Exact Characters

With this option, you specify the exact text to be replaced (including upper and lower case), and the exact replacement text (also including upper and lower case). Panorama will replace the text even if it is part of a larger word or phrase. For example, if you ask Panorama to exactly replace is with was, it will also change this to thwas, thistle to thwastle and isis to waswas. It will not, however, replace Is, IS, or THIS.

Entire Words Only

This is the default option. When this option is used, Panorama will only replace entire words. With this option selected, if you ask Panorama to exactly replace is with was it will not change this to thwas or thistle to thwastle.

When the Entire Words Only option is used, Panorama is smart about replacing upper and lower case text – it automatically matches the case of the replaced text. For example, if you ask it to replace inc with incorporated, it will automatically adjust the capitalization of the replacement text, as shown here.

inc ☞ incorporated
Inc ☞ Incorporated
INC ☞ INCORPORATED

If the the replacement word has unusual capitalization, for example MacDonald, use the Entire Words Only (Case Sensitive) option. This disables the automatic capitalization feature.

Regular Expression

This powerful option allows you to use a regular expression to specify what text should be replaced (see Regular Expressions). To demonstrate this, consider this database where numbered streets like 7th, 34th, and 127th are incorrectly capitalized. With a regular expression, this can be fixed without messing up street names like Third Street or Thorton Avenue. The regular expression matches one or more numeric digits, followed by Th, followed by a word break (a space or the end of the address).

The replacement string includes the numeric digits (thru the use of the $1 capture group) followed by th. When the Replace button is pressed, the addresses are fixed throughout the database.

Mastering regular expressions takes some effort, but the payoff can be huge.

Note: If you want to do this type of replacement in a program, use the formulafill statement with the regexreplace( or regexreplaceexact( function.

All Fields

The Find & Replace dialog normally replaces text only within the current field. If the All Fields option is checked, the operation will occur in every field in the database. Obviously you need to be careful when using this option to avoid unintended changes. Use the Undo command if something changed that you didn’t want changed.


See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0, now includes regular expressions and the ability to work across all fields.