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