Before being able to use regular expressions on analyzed columns in a database, you must first declare the created regular expression function, RegExMatch in this example, in the specified database via the studio. To do that:
In the DQ Repository tree view, expand Libraries > Indicators.
Expand System Indicators > Pattern Matching.
Double-click Regular Expression Matching, or right-click it and select Open from the contextual menu.
The corresponding view displays the indicator metadata and its definition.
You need now to add to the list of databases the database for which you want to define a query template. This query template will compute the regular expression matching.
Click the [+] button at the bottom of the Indicator Definition view to add a field for the new template.
In the new field, click the arrow and select the database for which you want to define the template, Microsoft SQL Server.
Copy the indicator definition of any of the other databases.
Click the Edit... button next to the new field.
The [Edit expression] dialog box is displayed.
Paste the indicator definition (template) in the Expression box and then modify the text after
WHENin order to adapt the template to the selected database.
Click OK to proceed to the next step. The new template is displayed in the field.
Click the save icon on top of the editor to save your changes.
For more detailed information on how to declare a regular expression function in the studio, see How to define a query template for a specific database and How to declare a User-Defined Function in a specific database.