Search and replace

 

Searching

You can start searching the current file by choosing the Search | Find... menu item.

 

 

Options

 

Enable regular expressions

Enables regular expressions in the search pattern. See below for more information on regular expression syntax.

Case Sensitive

Character case is ignored if this option is disabled.

Whole words only

Matches whole words only if this option is enabled.

 

Once you have initiated the search process you can go to the next occurrence by pressing F3 in the editor or to the previous occurrence by pressing Shift-F3.

 

 

Replacing text

Choose the Search | Replace... menu item if you want to replace text in the current file.

 

 

Actions

 

Find next

Searches for the next occurrence.

Find previous

Searches for the previous occurrence.

Replace

Replaces the currently marked occurrence.

Replace all

Replaces all occurrences in the specified region.

 

 

Options

 

Enable regular expressions

Enables regular expressions in the search pattern. See below for more information on regular expression syntax.

Case Sensitive

Character case is ignored if this option is disabled.

Whole words only

Matches whole words only if this option is enabled.

 

 

Regular expressions

 

CodeGuide supports the Perl regular expression syntax.

 

Commonly used symbols in regular expressions:

 

.

Match any character (except newline).

^

Match the beginning of a line.

$

Match the end of a line.

[A-Z]

Match the uppercase characters from 'A' to 'Z'.

[^A-Z]

Match all characters except the uppercase characters from 'A' to 'Z'.

()

Group an expression.

|

Alternation

*

Match the previous expression zero or more times.

+

Match the previous expression one or more times.

?

Match the previous expression one or zero times.

 

 

It is out of the scope of this manual to give a complete description of Perl regular expression. More information can be found at the Perl homepage (www.perl.com) or in books about Perl.

 

 

Search multiple files

 

CodeGuide allows you to search all source files of your project or all files in a directory.

 

You can search all source files of a project by choosing the Search | Search in project... menu entry.

 

You can search all files contained in a specific directory by selecting this directory in the Project Browser or in the File Browser and choosing the Search... menu item in the context menu.

 

 

The File types field specifies which files are searched. If you specify msore than one pattern you have to separate the patterns with ";" on Windows and ":" on Linux and Solaris. Enter a "*" in this field to have all files searched.

 

If the Show only the first match in each file option is disabled multiple occurrences of the search term in the same file are shown otherwise only the first occurrence is shown.

 

The search results are displayed in the Search result browser.

 

 

You can quickly move to an occurrence by clicking on the corresponding line the Search result browser.

 

CodeGuide allows offers a powerful usage searcher which is often a better choice than a text search. See the Usage search section for details.