Regex Replace

If you need to collectively edit values in the columns, you can use Regex Replace node. It allows you to replace a group of values that share the same pattern with a new value or just a part of the value.

Node configuration


  1. Click Add rule.
  2. Select one of the two available options:
    • Include these - the default; it allows you to select the columns that will be considered.
    • Include all except these - this option excludes values that match the regular expression in a selected column.
  3. Click Add column.
  4. From the dropdown list, select the columns whose values you want to transform.
  5. In the Regular expression field, enter the regular expression formula.
  6. From the Replace dropdown list, select one of the options:
    • Matching pattern - only the part of the value which matches the regular expression is replaced.
    • Entire value in the cell - a whole value is replaced.
      • Defined value - when you select this option, the rows in the new column are filled with the value you define.
        Important: If you leave an empty field for the “Custom value” option, the values in the column will be empty strings.
      • No value - when you select this option, the new column is added with empty rows.
        Important: If you choose the “No value” option, the values in the column will be null. It means that if a corresponding attribute exists in the database, it will be deleted.
      • UUID - fills the column with a generated UUID v4 (unique for each row).
      • Current date - fills the column with the current date (the date and time are generated on an ongoing basis during the transformation).
  7. In the Value field, enter the expression you want to replace the original value with.
  8. To add more rules, click Add rule and repeat steps from 2 to 7.
    Tip: You can preview the results in the Output data tab.
  9. Click Apply.

Current date option

Using the Current date option, you can enrich your data with a dynamically injected date and time which can be used, for example, to build an event salt. To define a rule with Current date:

  1. Select a timezone.
  2. Select one of the available formats:
    • ISO (for example 2022-10-05T05:55:16.786596Z)
    • Timestamp (for example 1664949342323)
    • MMM d, YYYY (for example Oct 5, 2022)
    • MMM d, YYYY, HH:mm:ss (for example Oct 5, 2022, 05:57:14)
    • YYYY-MM-dd HH:mm (for example 2022-10-05 05:57)
    • Custom - you can create your own date and time format.

Custom date format

You can use the following elements to build a custom format. The example values use October 05, 2022 as the date.

  • MMM - name of month (Oct)
  • MM - number of month (10)
  • DD - day of year (278)
  • dd - day of month (05)
  • YYYY - year (2022)
  • YY - year (22)

Example of use


You can replace the part of the domain in the email addresses of your customers - from .com to .co.uk. You can use this transformation in the further processes, for example, in importing customers to Synerise.

Example of use
Example of use
  1. Start the transformation with the Data Input node.
  2. Click the node.
  3. Upload a file on which you want to perform data transformation.
  4. Add the Regex Replace node and join it with the Data Output node.
  5. In the configuration of the Regex Replace node:
    1. Click Add rule.
    2. Select Include these
    3. Select the column with email addresses.
    4. In the Expression field, enter \.com$
    5. From the Replace dropdown list, select Matching pattern.
    6. In the Value field, enter .co.uk
      Changes applied
      Changes applied
  6. Click Apply.
  7. Add the Data Output node.
  8. Join the node with the Regex Replace node.
😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker