Mode Selection Options: Regex and Basic
Introduction:
Mode provides users with the flexibility to input data freely in Basic Mode or utilize regular expressions in Regex Mode. This empowers users to define patterns according to their preferences. The following guide outlines the process of mode selection, the Pattern Mapping dialog box, and validation procedures in both Basic and Regex Modes.
To initiate the Pattern Mapping dialog box, click on the "Add Rule" button to create a new rule, or, for an existing rule, choose the "Edit" button to make modifications, and for duplication, select the "Clone" button.
Upon selecting any of these options, the Pattern Mapping dialog box will appear as a pop-up window, as illustrated below.
The highlighted yellow area represents the Mode checkbox, with unchecked indicating Basic Mode and checked indicating Regex Mode. Default mode is Basic, checking the box switches to Regex. Multiple mapping rows can be added.
In Basic Mode, users can freely input data within curly braces "{value}" into the Pattern Field.
In Regex Mode, users can utilize regular expressions in the Pattern Field.
Pattern Field Validation:
The data will undergo validation if the Pattern Field is either empty or contains invalid data. In such instances, the Pattern field will be visibly displayed in an orange color. This validation process applies to both basic and regex modes.
If the 'Pattern' field is empty or not in the expected format when adding a pattern mapping, a popup message appears at the top, highlighting the respective field for user attention and correction.
After carefully selecting all the fields and ensuring that the specified condition in the Pattern field is met, proceed to click on "Add Pattern Mapping" to observe the newly created rule on the 'Configure Comment Handler' page.