Convertr Help Centre Help Center home page
Submit a request
Sign in
  1. Convertr Help Centre
  2. Product
  3. Campaign - Rules and Filters - Advanced

Value Transforms: Regex Find and Replace Follow

Introduction

As part of our Value Transforms functionality, we offer the ability to perform Regex Find and Replace.

Regex is short for Regular Expression, and we use it to search for formats, rather than actual values. This means you can search for a certain format, and replace it with something else. This is useful, for example, if you want to reformat date or telephone number values.

The Convertr platform supports PCRE Regex values. As this can be a tricky language to master, this document will also cover some commonly used examples.

Related documentation:

  • Value Transforms
  • Advanced Value Transforms/Manipulation: Trimming
  • Advanced Value Transforms/Manipulation: Find and Replace
  • Advanced Value Transforms/Manipulation: Regex Find and Replace
  • Advanced Value Transforms/Manipulation: Concatenation
  • Advanced Value Transforms/Manipulation: Casing
  • Advanced Value Transforms/Manipulation: Hashing
  • Advanced Value Transforms/Manipulation: Ordering

Best practice:

This document explains how to setup Value Tranforms at an Campaign level, however this method does not allow importing/copying of configurations across campaigns.

There is an option to setup Value Transforms at a Advertiser Level, where any configurations can then be imported into a campaign which removes repeated manual setup for any subsequent campaigns. Therefore, setting up Value Transforms at an Advertiser level is recommended. 

 

Setup Process

1. Within a campaign, click the Admin menu and select Value Transforms.

mceclip0.png2. Enable Value Transforms by using the toggle.

mceclip1.png

3. On this page, select Add.

Screen_Shot_2022-09-15_at_1.45.59_PM.png

4. Here, you'll need to fill out each field:

  • Label: A name for the Value Transform
  • Original Fieldname: the field you are looking to reformat
  • New Fieldname: the field we will store your reformatted value in
  • Order: This will dictate when this Value Transform should run, in relation to any other transformations set up in the campaign. By default this is 0, meaning that it will run first. Increasing the order changes when it will run.

Screen_Shot_2022-09-15_at_1.48.20_PM.png

5. You will need to select Manipulate. This will give you a type dropdown, where you can select Regex Find and Replace.

Screen_Shot_2022-09-15_at_1.48.40_PM.png

6. Enter your find and replace Regex, and click Add.

Screen_Shot_2022-09-15_at_1.49.09_PM.png

Screen_Shot_2022-09-15_at_1.49.17_PM.png

Your setup is complete from here! You'll be able to use the Preview at the bottom to check that it reformats as intended:

Screen_Shot_2022-09-15_at_1.52.21_PM.png

 

Common Regex Examples

Example Find Regex Replace Regex Notes
Change 2021-09-29 to 09/29/2021 /(\d{4})-(\d{2})-(\d{2})/ $2/$3/$1 The Replace Regex can be amended, depending on your divider between the dates (e.g. $2.$3.$1 would give you 09.29.2021).
Change 2021-09-29 to 29/09/2021 /(\d{4})-(\d{2})-(\d{2})/ $3/$2/$1 The Replace Regex can be amended, depending on your divider between the dates (e.g. $3.$2.$1 would give you 29.09.2021).
Change 2021-09-29 to 09/29/21 /(\d{2})(\d{2})-(\d{2})-(\d{2})/ $3/$4/$2 The Replace Regex can be amended, depending on your divider between the dates (e.g. $3.$4.$2 would give you 09.29.21).
Change 2021-09-29 to 29/09/21 /(\d{2})(\d{2})-(\d{2})-(\d{2})/ $4/$3/$2 The Replace Regex can be amended, depending on your divider between the dates (e.g. $4.$3.$2 would give you 29.09.21).
Change XXXXXXXXXX to XXX XXX XXXX /(\d{3})(\d{3})(\d{4})/ $1 $2 $3 Useful for US telephone number formats
Change XXXXXXXXXX to (XXX) XXX-XXXX /(\d{3})(\d{3})(\d{4})/ ($1) $2-$3 Useful for US telephone number formats
If field contains the word 'Manager', create a new field with value 'Management' /(.*)(Manager)+(.*)/ Management

Useful for standardisation

Create a new field with the word 'Example' /^(.*)$/ Example The Find Regex is a catchall that can be used on any existing field and will capture the whole value. Useful for appending static data to lead automatically
Concatenate the word 'example' BEFORE your field value /^(.*)$/  example $1 Concatenation uses your field value as a start point. This allows you to set a value before that start point
Remove line break /(.*)(\n)(.*)/ $1 $3 Useful for 'textarea' field type where multiple lines are likely

Articles in this section

  • Processr Job Descriptions (Publishers)
  • Advanced Value Transform/Manipulation: Casing
  • Email Verification
  • Lead Within Time Period
  • Advanced Value Transform/Manipulation: Hashing
  • Multi Field Condition Check
  • Invalid Lead Reasons - What they Mean and What to Do
  • Value Transforms: Regex Find and Replace
  • Convertr Connect: Validation Lists
  • Convertr Connect: Simple Conditional Validation
See more

Related articles

  • Using the Adestra Form Lookup
  • Advanced Value Transform/Manipulation: Find and Replace
  • Advanced Value Transform/Manipulation: Hashing
  • Scheduled Delivery
  • Assigning a Publisher to a Campaign - Fixed Costs and CPL
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request
Return to top

Related articles

  • Using the Adestra Form Lookup
  • Advanced Value Transform/Manipulation: Find and Replace
  • Advanced Value Transform/Manipulation: Hashing
  • Scheduled Delivery
  • Assigning a Publisher to a Campaign - Fixed Costs and CPL
Convertr