• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Lesson 2. Introducing ColdFusion Studio > The Search and Replace Tool

The Search and Replace Tool

Many of the tools that you will use are on the Tools menu; however, one that you will use very often is not. The Search and Replace function is one of the most time-saving features in Studio. Imagine having 100 font tags in a page, each with the size attribute set to 4. If you needed to change the size attribute to 3, you would have to do it 100 times! With Search and Replace you can accomplish this in a matter of seconds.

Select the complete text of the <font> tag in helloworld.cfm.

The text that you select will populate the Search field when you get to the Search and Replace window. This will save you having to type in the value.

Choose Search > Extended Replace.

This brings up the Extended Replace window. The font tag you are going to work with is already in the Find What field.

In the Replace With field, type the value that you want to replace the initial font tag with.

Now you have both values in place: the one you are going to search for and the one you are going to replace it with. You could just copy what you have in the Find field, paste it into the Replace field, and make your changes.

The Extended Replace feature will replace every instance of the font tag in the Find what field with the value in the Replace with field. Even better, you have the option of replacing these values in only the current document, in all open documents, or in a specific folder. This can make site-wide changes very quick and easy as well. If you want to change the default (change only in current document), you can do so now.

Click Replace.

Once you click Replace, ColdFusion Studio will perform the search and replace action. When it's done, a results window will appear at the bottom of your screen and give you detailed information about what was replaced, how many times it was replaced, and where it was replaced.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint