Creating a regular expression to match the cities - Cloud

Talend Cloud Data Preparation Quick Examples

Version
Cloud
Language
English (United States)
Product
Talend Cloud
Module
Talend Data Preparation
Content
Data Quality and Preparation > Cleansing data

You will create a regular expression to match all the cities you are interested in, in other words the five biggest cities in France: Paris, Lyon, Marseille, Toulouse, and Bordeaux.

Procedure

  1. Click the header of the city column to select its content.
  2. In the functions panel, on the right side of the screen, type Matches pattern and click the result to open the options for the associated function.
  3. In the Pattern field, select Other.
  4. From the Manual pattern drop-down list, select RegEx.
  5. In the Manual pattern field, enter the following regular expression:
    ^Paris$|^Marseille$|^Lyon$|^Toulouse$|^Bordeaux$

    This expression will match all the sales that occurred in these five cities.

  6. Click Submit.

Results

A new column is created, where rows that match the regular expression are marked as true, while those who do not are marked as false.