The Find/Replace dialog opened with the menu entry Ctrl+F) enables you to define "search for" or "search for and replace" operations on the current document. The find works on multiple lines, which means a find match can cover characters on more than one line. To insert a new line in the find or replace text area press CTRL + Enter instead of Enter. The replace operation can bind Perl 5 regular expression group variables ($1, $2, etc.) from the find match. For example to replace the tag with attributes called tag-name with the tag tag-name1 use as text to find <tag-name(\s+)(.*)> and as replace text <tag-name1$1$2>.
→ (Find occurrences of a word or string of characters including white spaces represented on a line or on multiple lines and highlight the position in the editor.
Replace occurrences of target defined in the Text to find area with a word or string of characters, including white spaces, that can be on a line or on multiple lines, defined in the Replace with area.
Replace all occurrences of a word or string of characters including white spaces that can be on a line or on multiple lines.
The dialog contains the following fields/options:
The target character string to search for. The string can be on a line or on multiple lines. Special characters like newline and tab can be inserted using the contextual menu.
You can search for Unicode characters specified in the \uNNNN
format. Also, hexadecimal notation (\xNNNN
) and octal notation
(\0NNNN
) can be used. Note that in this case you have to check
the Regular expression checkbox. For example to
search a space character you can use \u0020 code.
The character string with which to replace the target. The string for replace can be on a line or on multiple lines. Special characters like newline and tab can be inserted using the contextual menu. It may contain regexp group markers if the search expression is a regular expression and the regular expression checkbox is checked.
Unicode characters can also be used in the Replace with area.
The last find and replace operations history is available using the
buttons from the top of the find or replace text area.Specify if the search direction is from current position to end of file (forward direction) or to start of file (backward direction).
Specify if the search is executed on all file or only on the lines that were selected when the dialog was invoked. If the selection was on a single line the search is executed on all the file.
Execute a find operation for the next occurrence of the target and stop.
Execute a replace operation for the target followed by a find operation for the next occurrence.
Execute a replace operation in the entire scope of the document.
Execute a replace operation starting from current target until the end of the document, in the direction specified by the current selection of the Direction switch (forward or backward).
When checked, operations are case sensitive.
When checked only whole occurrences of a word will be included in the operation.
When checked, search operation is started for every letter typed in or deleted. The first match that obeys the checked conditions will be highlighted.
When checked allows using any regular expression in PERL syntax.
A dot used in a regular expression matches also end of line characters.
Continues the find from the start (end) of the document after reaching the end (start) if the search is in forward (backward) direction.
In Author mode an attribute cannot be searched directly. For finding an attribute just click on the link Find All Elements/Attributes ... which opens the dialog with the same name.