The XML Schema regular expressions builder allows testing regular expressions on a fragment
of text as they are applied to an XML instance document. Start the tool from menu .
The dialog contains the following sections:
- Regular expressions editor - allows you to edit the regular
expression to be tested and used. Content completion is available and presents a list with
all the predefined expressions. It is triggered by pressing
(Ctrl - Space).
- Error display area - if the edited regular expression is incorrect,
an error message will be displayed here. The message contains the description and the exact
location of the error. Also, a click on the quick navigation button (
) highlights the error inside the regular
expression.
- Category combo box - here you can choose from several categories of
predefined expressions. The selected category influences the displayed expressions in the
Available expressions table.
- Available expressions table - holds the available regular
expressions and a short description for each of them. The set of expressions depends on the
category selected in the previous combo box. You can add an expression in the
Regular expressions editor by double-clicking on the expression row
in the table. You will notice that in the case of Character
categories and Block names the expressions are also
listed in complementary format. For example: \p{Lu} - Uppercase letters;
\P{Lu} - Complement of: Uppercase letters.
- Evaluate expression on radio buttons - there are available two
options:
- Evaluate expression on each line - the edited expression will
be applied on each line in the Test area;
- Evaluate expression on all text - the edited expression will be
applied on the whole text.
- Test area - a text editor which allows you to enter a text sample
on which the regular expression will be applied. All matches of the edited regular
expression will be highlighted.
After editing and testing your regular expression you can insert it in the current editor.
The Insert button will become active when an editor is opened in the
background and there is an expression in the Regular expressions
editor.
The regular expression builder cannot be used to insert regular expressions in the grid version or the schema version of a document editor.
Accordingly, the Insert button of the dialog will be disabled if the
current document is edited in grid mode.
Note: Some regular expressions may block indefinitely the Java Regular Expressions engine. If the execution of the regular expression does not end in about five seconds, the application displays a dialog that allows you to interrupt the operation.