# Editing the pattern indicator and using it in a column analysis

Available in...

* Big Data Platform
* Cloud API Services Platform
* Cloud Big Data Platform
* Cloud Data Fabric
* Cloud Data Management Platform
* Data Fabric
* Data Management Platform
* Data Services Platform
* Qlik Talend Cloud Enterprise Edition
* Qlik Talend Cloud Premium Edition
* Real-Time Big Data Platform

Before being able to use regular expressions on analyzed columns in a database, you must first declare the created regular expression function by adding the SQL instruction and the pattern.

## Before you begin

* You have created a regular expression on Teradata.
* You have selected the Profiling perspective.

## Procedure

1. In the DQ repository tree view, expand Libraries &gt; Indicators &gt; System Indicators &gt; Pattern Matching.
2. 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.

   ![Regular Expression Matching view.](https://help.qlik.com/talend/en-US/studio-user-guide/Resources/images/regex_function_template1.png)
3. Scroll down to the Teradata line.
4. Click Edit....

   The Edit expression dialog box opens.
5. In the Expression box, add the following SQL expression:
   ```
   SELECT COUNT(CASE WHEN Regex_INSTR(<%=__COLUMN_NAMES__%>,<%=__PATTERN_EXPR__%>) =1 THEN 1 END), COUNT(*)FROM <%=__TABLE_NAME__%> <%=__WHERE_CLAUSE__%>
   ```
6. Add a pattern indicator into a column analysis:
   1. In the Analysis Setting page, expand the Data preview part.
   2. Click Select indicators.
   3. Expand Patterns and select the patterns you need.

      The new expression will be used no matter what patterns you are selecting.
7. Run the analysis and switch to the analysis results.
8. In the Pattern Matching table, right-click the pattern results and select View invalid rows, for example. The SQL editor opens listing invalid data and the SQL expression looks like the following:
   ```
   SELECT * FROM "test"."Employee" WHERE ( not REGEX_INSTR("FULLNAME" , '^[A-Z]+' ) =1 OR "FULLNAME" IS NULL )
   ```