Skip to main content
Windward

Find and Replace

Overview

(Version 10 and newer; replaced Search and Replace)

A find & replace tool that operates on the attributes in tags. It lets you search on specific tags and attributes within those tags as well as find & replace on all tags.

Details

Tip: We recommend you make a copy of a template before running Find&Replace. There is no “undo” operation and if you make a mistake, it might take some time to get back to the original.

Note: Find & Replace does not touch text outside of a tag.

 

 

To run this command, select the Replace icon in the AutoTag Manager Tab under the Tools menu:

 

 

This launches the Find & Replace tool:

From within this window you can find and replace a variety of items. By default the tool operates on the select attribute in all tags, but you can select or deselect the type of tag, the type of tag property, and more.

Replace, Replace All, and Find Next

After you enter the tag text you want to find (in the Find What box) and the tag text you want to replace it with (in the Replace What box), you have several options for choosing how to replace that text.

  • Replace. This will find the first instance (more on "first instance" -- see down/up/all below) in the template and automatically replace the old text with the new text. If your cursor is already on a tag that meets the criteria, it will replace the text in that tag.
  • Replace All. This will find ALL instances and automatically replace the old text with the new text. Remember, this command cannot be undone, so use with caution.
  • Find Next. This will find the first instance of the old text in the template but it does not replace the text. You must then click Replace to replace the old text with the new text. This is a good way to double-check that you want to act upon a tag's text without changing it first.

Search Options: Down, Up and All

You can search all of a template, just the portion of it before your cursor, or just the portion of it after your cursor. You must choose one and only one of the following options:

  • Down. Place your cursor anywhere in the template. If you select this radio button, the tool will look at all tags after the cursor. If the cursor is on the beginning of a tag, it will include that tag as well.
  • Up. Place your cursor anywhere in the template. If you select this radio button, the tool will look at all tags before the cursor. If the cursor is on the end of a tag, it will include that tag as well.
  • All. The tool looks at all tags in the template and does not pay attention to the location of your cursor.

Search Options: Match Case, Whole Properties and more

You can choose from among any of the following options when finding tags:

  • Match Case. When this box is checked, only tags that match the search criteria exactly with both upper- and lower-case letters will be found. For example, if the Find What box says Windward, the tool will act upon tags with the string Windward but not tags with the string windward.
  • Find Whole Properties Only. When this box is checked, only tags whose entire text matches the search criteria will be found. For example, if the Find What box says windward, the tool will act  upon tags with the text string windward only but not tags with the text string windwardrocks.
  • Use Regular Expressions. When this box is checked, you can place regular expressions to find (but not replace) text. For example, say you use the regular expression | (pipe) in the Find What box: wind|ward. The tool will act upon tags with the text string wind or ward. For a list of regular expressions, please see http://www.regular-expressions.info/reference.html.
  • Create Property. When this box is checked, you can create properties (condition, credentials, data source, etc.), for tags that don't have the properties you have selected and then put values in those properties.

Example of when this tool is useful

Say you give your data source a nickname TestSQL and then you move your templates to a production server where the SQL connection is different.  You create the new SQL connection and then want to keep them distinct so you give it a new nickname, ProdSQL.  

You would then need to update the attribute datasource=”” in every single tag in the document. The find/replace is a powerful feature because you can have it search all tag types and then look for the old text TestSQL and replace with the new text ProdSQL. This saves lots of time as you did not need to touch each tag individually.

 

Searching Headers and Footers

If you want the Find/replace to include the header/footer, you need to select “All (document)”. There is no other way to search the entire document other than this option.

  • Was this article helpful?