Search/Replace

From Q
Jump to: navigation, search

This feature allows automatic editing of multiple text items at any one time. To use it:

  1. Select the relevant variables.
  2. Right-click and select Search/Replace and select the appropriate option.
  3. Fill in the Find What box.
  4. Fill in the Replace With box.

Wildcards

Wildcards allow you to create rules whereby you find and replace text even where there are not exact matches.

* Matches anything. e.g. "Ages * and up" would match "Ages seven and up".
# Matches a single numeral (or the character #). e.g. "Q#" would match "Q7".
? Matches a single character. e.g. "Part ?" would match "Part A".


You can use the special text ${0} in Replace with to quote the original text that was found in the search. For example, to append "POST" to the end of a set of variable labels:

Search document: *

Replace with: ${0}POST

Note that wildcards do not apply when doing replacements on JavaScript formulas which have more than one line of code.

Buttons, options and fields

Find What This is the text to search for. You can use the wildcards * (anything), # (single numeral) or ? (single letter). This is a drop-down menu and contains old search terms.

Replace With When the search text is found, this text will be used to replace it. If you leave this empty, the search text will be removed. This is a drop-down menu and contains old replace terms.

Replace multiple occurrences If this is not ticked only the first occurrence of Find what will be replaced.

Only match at end of label If this is ticked, the Find what text must occur at the end of the label, otherwise it will not match. For example, "Chocolate" would not be found in the label "Junk foods (e.g. chocolate, pizza, etc.)", but would be found in the label "Junk foods - Chocolate".