To generate XML Schema regular expressions use the action
→ It will open a dialog which allows you to build and test regular expressions.The dialog contains the following sections:
Regular expressions editor - allows you edit the regular expression to be tested and used. Content completion is available and presents a list with all the predefined expressions. It is accessible by pressing Ctrl + Space.
If the edited regular expression is not correct, an error message that contain the position where the error was detected, will be display. If you click on the error message or on the button
, the error will be highlight inside the regular expression for easily correct them.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 - it consists of two columns. The first one presents the regular expressions, the second displays a short description of the expressions. The set of expressions depend 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 and Evaluate expression on all text . If the first option is selected the edited expression will be applied on each line from the Test area. If the second option is selected the expression will be applied on the whole text.
Test area - it is a text editor which allows you to enter a text sample on which the regular expression will be applied. The matches of the 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.