RegEx Advanced transformation examples

Review the RegEx Advanced examples below.

Example one: Regular expression transformation

You want to import phone number data and transform the data so that only number characters are ingested. You select to replace all occurrences and enter [^0-9] in the of RegEx pattern field.

An image of an example using a regular expression transformation

Example two: Replace defined value

You want to replace all occurrences of "Mister" with "Mr.". You select to replace all occurrences, enter Mister in the of RegEx pattern field, and enter Mr. in the with Value field.

An image showing a replace transformation

Example three: Minimum number of characters required

You want to only transform ingested values that have a minimum of five characters. Values that are five characters or fewer will not be transformed and the ingested data will be a blank value. You enter 5 in the If length exceeds Characters field.

An example showing a regular expression transformation with a minimum number of characters

Example four: Maximum number of characters for ingested data

You want to remove the country code from phone numbers (+44 555-123-4567). You enter 12 in the and is less than Characters field. The string will be truncated from the beginning.

An example showing a regular expression transformation with a maximum number of characters

Learn more

RegEx Advanced transformation

Creating ingest jobs

transform, transformation, regex, regular expression, regex transformation, regular expression transformation, ingest job