Skip to main content Skip to complementary content
Close announcements banner

Creating a regular expression to match the car years

You will create a regular expression to match all the dates you are interested in, namely 1950, 1960, 1970, 1980, 1990, 2000 and 2010.

Procedure

  1. Click the header of the car_year 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:
    ^1950$|^1960$|^1970$|^1980$|^1990$|^2000$|^2010$

    This expression will match all the rows with sales involving cars from the year 1950, 1960, 1970 and so on.

  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.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!