4.4. Search tool
Prev | 4. Tools | Next

### 4.4. Search tool

Procedure for performing a text search:

1. Type text to be searched in Search field or choose it from the menu of the combobox.

2. Change the search options as needed (see below).

3. Type Enter in the Search field or click on the Start button.

4. During the search session

   - click Skip on to skip found text,

   - OR click on Skip Element to skip the element containing the found text.

5. The search session can be stopped by

   - clicking on Stop,

   - OR typing Esc (this also gives back the keyboard focus to the document view),

   - OR by simply clicking anywhere in the document view.

Procedure for performing a text search/replace:

1. Type text to be searched in Search field or choose it from combo box menu.

2. Check the Replace toggle

3. Type replacement text in Replace field or choose it from combo box menu.

4. Change the search options as needed (see below).

5. Type Enter in the Search or Replace fields or click on the Start button.

6. During the search/replace session

   - click Skip on to skip found text,

   - OR click on Skip Element to skip the element containing the found text.

   - OR click Replace on to replace found text.

   - OR click Replace All on to replace all occurrences of searched text.

7. The search/replace session can be stopped by

   - clicking on Stop,

   - OR typing Esc (this also gives the keyboard focus back to the document view),

   - OR by simply clicking anywhere in the document view.

Search options:

Ignore case

  The search is case-insensitive. Example: "`foo`" matches both "`foo`" and "`Foo`".

Whole word

  The found string must be a word, that is, the found string must be surrounded by white spaces. Example: "`foo`" matches "`foo`" but not "`foobar`".

Regular expression

  The searched string must be a valid regular expression. A regular expression is specified in a syntax similar to that used by Perl. See also http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html.

  In such case, `$1`, `$2`, ..., `$9` may be used in the replacement string to refer to the substrings matching the parenthesized groups of the regular expression.

  `$0` is replaced by the string matching the regular expression in its entirety. "`$$`" may be used to quote character '`$`'.

  Examples:

  - "`f(o+)`" matching "foo", replaced by "`g$1`", gives "`goo`".

  - "`f(o+)`" matching "`foo`", replaced by "`$0bar`", gives "`foobar`".

  - "`f(o+)`" matching "`foo`", replaced by "`g$$1`", gives "`g$1`".

Smart text boundaries

  Searching string "`Hello world!`" in an XML document is not as obvious as it seems: for example, is "`Hello world!`" with word "`Hello`" contained in an emphasis element followed by text node " `world!`" supposed to be found by XXE?

  - If this toggle is checked, the answer is yes. "`Hello world!`" is found within "`<em>Hello</em> world!`" but not within "`<p>Hello </p><p>world!</p>`".

    This mode uses the grammar constraining current document to recognize logically contiguous text across different types of elements.

  - If this toggle is not checked, the answer is no. Each text node is separated from other text nodes whatever the type of the element containing it.

Direction
  Up

    The document is searched from caret position to the beginning of the document.

  Down

    The document is searched from caret position to the end of the document.

Prev | Up | Next
4.3. Attributes tool | Home | 4.5. Spell tool