Find/Replace Text dialog boxes

Use the Find/Replace Text and Replace/Find Text dialog boxes to specify text you want to search for. You can also replace the found text with another text string or with nothing.

To open the Find/Replace Text dialog box, choose Search|Find.

To open the Replace/Find Text dialog box, choose Search|Replace.

The Find/Replace Text and the Replace/Find Text dialog boxes are identical except for their titles.

Text To Find

Enter a search string or click the down arrow next to the input box to select from a list of previously entered search strings.

Replace With

Enter the replacement string or click the down arrow next to the input box to select from a list of previously entered replacement strings. To replace the text with nothing, leave this input box blank.

Options

Specifies attributes for the search strings.

Case Sensitive
Differentiates uppercase from lowercase when performing a search.

Pattern Match(? and *)
Matches strings that contain the ? and * characters. For example, when this option is checked, the string bean?.java could result in these matches: bean1.java, bean2.java, and bean3.java. The ? character matches any single character while the * character matches one or more characters.

Search Only Selected Text
The search occurs only within text selected in the editor.

Search From Start Of File
The search begins at the start of the file. If this option is not checked, the search begins from the position of the cursor in the file to the end of the file.

Find Whole Words Only
Searches for whole words only--words that are delimited by white space, punctuation, or special characters.

Direction

Specifies the direction you want to search, starting from the current cursor position.

Forward
Searches from the current position to the end of the file. Forward is the default Direction setting.

Backward
Searches from the current position to the beginning of the file.

Buttons

Find
Begins the search for the specified text. The search ends when the first instance of the search string is found.

Replace
Begins the search for the specified text. Once the string is found, a Confirm Replace dialog box appears that asks if you want to replace the string with the text you entered in the Replace With field. If you choose Yes, the text is replaced and the search resumes for the next occurrence. If you choose No, the search string is not replaced with the replacement string and the search continues for the next instance of the search string. If you choose Replace All, all instances of the search string are replaced with the replacement string. If you choose Done, the search stops and the dialog box disappears.

Find All
Begins the search for the specified text. The search ends when all instances of the search string are found. Each line where the search string appears is reported on the Search Results page of the message pane. Click on any of these to go to its occurrence in the editor.