<html><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"><title>Search, replace and go to</title><linkrel="stylesheet"href="geany.css"type="text/css"><metaname="generator"content="DocBook XSL Stylesheets V1.68.1"><linkrel="start"href="index.html"title="
"><linkrel="up"href="ch03.html"title="Chapter3.Usage"><linkrel="prev"href="ch03s04.html"title="Character sets and Unicode Byte-Order-Mark (BOM)"><linkrel="next"href="ch03s06.html"title="Preferences"></head><bodybgcolor="white"text="black"link="#0000FF"vlink="#840084"alink="#0000FF"><divclass="navheader"><tablewidth="100%"summary="Navigation header"><tr><thcolspan="3"align="center">Search, replace and go to</th></tr><tr><tdwidth="20%"align="left"><aaccesskey="p"href="ch03s04.html">Prev</a></td><thwidth="60%"align="center">Chapter3.Usage</th><tdwidth="20%"align="right"><aaccesskey="n"href="ch03s06.html">Next</a></td></tr></table><hr></div><divclass="section"lang="en"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aname="search_replace"></a>Search, replace and go to</h2></div></div></div><p>
This section describes search-related commands from the Search menu and
the editor window's popup menu:
</p><p>
</p><divclass="itemizedlist"><ultype="disc"><li><p>Find</p></li><li><p>Find usage *</p></li><li><p>Find in files</p></li><li><p>Replace</p></li><li><p>Go to tag definition *</p></li><li><p>Go to tag declaration *</p></li><li><p>Go to line</p></li></ul></div><p>
</p><p>
* These items are available from the editor window's popup menu, or by
using a keyboard shortcut (see <ahref="ch03s09.html"title="Keybindings">the section called “Keybindings”</a>).
The Replace dialog has the same options for finding text as the Find
dialog. There is also a "Replace in all files" option, which is used with the
Replace All button to perform the replacement for all open files.
</p><p>
The "Use regular expressions" option applies both to the search string and
to the replacement text; for the latter back references can be used -
see the entry for '\n' in <ahref="ch03s05.html#regexp"title="Table3.2.Regular expressions">Table3.2, “Regular expressions”</a>.
</p></div><divclass="section"lang="en"><divclass="titlepage"><div><div><h3class="title"><aname="id2752543"></a>Go to tag definition</h3></div></div></div><p>
If the current word is the name of a function and the file containing the
function definition (a.k.a. function body) is open, Go to tag definition will
switch to that file and go to the corresponding line number.
The current word is either taken from the word nearest the edit cursor, or
the word underneath the popup menu click position when the popup menu is
used.
</p></div><divclass="section"lang="en"><divclass="titlepage"><div><div><h3class="title"><aname="id2752560"></a>Go to tag declaration</h3></div></div></div><p>
Like Go to tag definition, but for a forward function declaration (a.k.a.
function prototype) instead of a function definition.
</p></div><divclass="section"lang="en"><divclass="titlepage"><div><div><h3class="title"><aname="id2752573"></a>Go to line</h3></div></div></div><p>
Go to a particular line number in the current file.
In a regular expression, the following characters are interpreted:
</th></tr></thead><tbody><tr><td>.</td><td>Matches any character.</td></tr><tr><td>(</td><td>This marks the start of a region for tagging a match.</td></tr><tr><td>)</td><td>This marks the end of a tagged region.</td></tr><tr><td>\n</td><td>Where n is 1 through 9 refers to the first through ninth tagged region
when replacing. For example, if the search string was Fred([1-9])XXX
and the replace string was Sam\1YYY, when applied to Fred2XXX this would
generate Sam2YYY.
</td></tr><tr><td>\<</td><td>This matches the start of a word.</td></tr><tr><td>\></td><td>This matches the end of a word.</td></tr><tr><td>\x</td><td>This allows you to use a character x that would otherwise have a special
meaning. For example, \[ would be interpreted as [ and not as the start
of a character set. Use \\ for a literal backslash.
</td></tr><tr><td>[...]</td><td>This indicates a set of characters, for example, [abc] means any of the
characters a, b or c. You can also use ranges, for example [a-z] for any
lower case character.
</td></tr><tr><td>[^...]</td><td>The complement of the characters in the set. For example, [^A-Za-z] means
any character except an alphabetic character.
</td></tr><tr><td>^</td><td>This matches the start of a line (unless used inside a set, see above).</td></tr><tr><td>$</td><td>This matches the end of a line.</td></tr><tr><td>*</td><td>This matches 0 or more times. For example, Sa*m matches Sm, Sam, Saam, Saaam and so on.</td></tr><tr><td>+</td><td>This matches 1 or more times. For example, Sa+m matches Sam, Saam, Saaam and so on.</td></tr></tbody></table></div><p>