Convertr Help Centre Help Center home page
Submit a request
Sign in
  1. Convertr Help Centre
  2. Validation and Verification

Value Transforms: Regex Find and Replace Follow

Michael Konomanyi
  • September 29, 2021 17:07
  • Updated

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.

 

Setup Process

1. Within a Campaign, navigate to Admin > Value Transforms.

blobid0.png

If this is not present, you can enable it by going to Admin > Setup, and checking the box to enable Value Transforms at the bottom of the page, then try the above step again.

blobid1.png

 

2. On this page, select Add Fieldname.

blobid3.png

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

  • Original Fieldname: the field you are looking to reformat
  • New Fieldname: the field we will store your reformatted value in
  • Label: A name for the Value Transform
  • 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.

blobid4.png

 

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

blobid5.png

 

5. Enter your find and replace Regex.

blobid6.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:

blobid7.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

Articles in this section

  • Value Transforms: Regex Find and Replace
  • Value Transforms - Ordering the Transformations/Manipulations
  • Social Enrichment
  • Value Transforms - Campaign Level
  • Duplicate Field Check Job
  • Search International Company Information Job
  • Quality Assurance Jobs in the Processr
  • ABM Validation Jobs
  • Auto Mapping Validation and Verification Jobs
  • Batch Importing Value Transforms
See more

Related articles

  • HTTP Integration Examples: Hubspot Forms
  • HTTP Integration Example: Marketo Forms
  • Value Transforms - Ordering the Transformations/Manipulations
  • Fair Usage Policy
  • Convertr Security FAQ
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request
Return to top

Related articles

  • HTTP Integration Examples: Hubspot Forms
  • HTTP Integration Example: Marketo Forms
  • Value Transforms - Ordering the Transformations/Manipulations
  • Fair Usage Policy
  • Convertr Security FAQ