Find and Replace

The Find and Replace dialog allows you to quickly find and replace text inside of a template.

Opening the Find and Replace dialog

You can open the Find and Replace dialog by pressing Ctrl+F or Ctrl+H.

Find and Replace Options

The following options are available for 

Find what: Enter the text that you wish to find.

Replace with: Enter the text that you wish to replace the found text.

Look in: Allows you to configure where you want to search. To search only current document, select Current Document from the Look in drop down menu.

Find Next: Click this button to find the next match in the file.

Replace: Click this button to replace the next match in the file.

Replace All: Click this button to replace all matches in the file.

Find Options

Match case: To limit your search to an exact case match, check the Match case checkbox. Otherwise, text will match regardless of case.

Match whole word: To limit your search to whole word matches, check the Match whole word checkbox. Otherwise, text will match in partial words.

Search up: To search from the current cursor position to the top of the file, check the Search up checkbox. Otherwise, the search will be from the current cursor position to the end of the file.

Use

This options allows you to search by regular expressions or by using a wildcard. See below for more information.

Find using a Regular Expression

To search using regular expressions, check the Use check box and select Regular Expressions. You can use the following regular expression syntax:

.

Any single character

*

Zero or more

+

One or more

^

Beginning of line

$

End of line

\b

Word boundary

\s

White space

\n

Line break

[]

Any one character in the set

[^]

Any one character not in the set

|

Or

\

Escape special character

Replace using a Regular Expression

To replace using regular expressions, check the Use check box and select Regular Expressions. Next, lets assume you want to find and replace all methods that start with Get and end with Result (E.G., GetApplicationResult) and remove the Get keyword. We'd start by building our regex that captures all letters between the characters Get and Result. In the Find What input field we would enter Get(\w+)Result.  Finally, in the Replace With input field we would enter in $1Result and press the Replace All button. All occurrences will now be updated (E.G., ApplicationResult).

 Find using a Wildcard

To search using wildcards, check the Use check box and select Wildcards. You can use the following wildcard syntax:

*

Zero or more of any character

?

Any one character

#

Any single digit

[]

Any one character in the set

[^]

Any one character not in the set