|Top Previous Next|
An item of the Help menu is Regex Test. Here you can call a dialog box for testing single regular expressions.
The dialog consists in a menu, a tool bar and three sub-windows.
The items of the menu can be executed by means of the buttons in the tool bar too.
The contents of the three windows are cleared.
The regular expression in the topmost window will be compiled. Depending on the correctness of the syntax the success will be confirmed or an error will be shown.
The regular expression in the topmost window will be compiled and applied to the text in the middle window. If the expression is syntactical correct, it will be listed together with its sub-expressions in the undermost window. In the right of each sub-expression the sections of text is presented, which is matched by the sub-expression. In the example shown, the first sub-expression matches the hours and the second the minutes of the time.
In the list box of the tool bar all tokens of the actual project are listed. If you choose one of these tokens, its definition will be shown in the sub most window of the dialog box.
The option SKIP is usually deactivated. Then a match in the text only is found, if it matches at the start of text. (When parsing a text the next token shall match at the current text position normally.)
If the option SKIP is activated, then in the complete text is searched for to the next position where the regular expression matches. If the text beginning matches, this is judged to be a fault.
The word boundary option here has the same effect for literals as the word boundary option in the project settings. The evaluation is done as in the case of the parsers produced by TETRA, by a special ternary tree. For regular expressions this option doesn't have any consequences here, since the expression is taken unchanged from the topmost edit field The SKIP expressions of a production are created however, while compiling the project and literal sub-expressions then are inserted together with word boundaries expressed by the anchors "\<" and "\>".
The case sensitive option here has the same effect as the case sensitive option in the project settings.
The test of the regular expression works in the same manner as a scanner of a TextTransformer project. If the expression in the up most window is a literal, this will be mentioned in the result window. The expression then will not be evaluated as regular expression, but as a literal. While '"' and '\"' are indifferent for a regular expression, this is not the case for the test of literals.
This page belongs to the TextTransformer Documentation
|Home Content German|