Extracts the value from the selected field that matches a search pattern. Regular expressions (regex) are used for the match.

In this example the source contains a field Product that holds the product name and the optional edition between curly brackets. With a regular expression pattern it’s possible to extract the edition information from the product text.
Configuration
Field – Select the field from the source that is checked for an empty value.
Output field name – The name of the newly added field.
Regular Expression – The regex that is used to extract the value needed.
Case-insensitive – Turn on to ignore casing in the regex search.
Notes – Optional description to describe the reason this transformation is added. Convenient for later reference.
Regular expression examples
Description | Regex | More information |
---|---|---|
Get first up to 3 characters | ^.{0,3} | Will get the first 0 to 3 characters |
Get last up to 3 characters | .{0,3}$ | Wil get the last 0 to 3 characters |
Get the first word | ^[^\w]*(\w+) | Can include digits and _ |
Get the last word | (\w+)[^\w]*$ | Can include digits and _ |
Get all characters up to ‘;’ | ([^;]+); | Will match test in ;test; |
Get all characters after and including ‘abc’ | abc.* | |
Get all characters that are between { and } | {(.+)} | Will match x}test{x in {x}test{x} |
Gets all characters after abc up until the line break | [\n\r].abc\s([^\n\r]*) | For use in cases where there is a ‘label’ and ‘value’. Example: Your company name: Blue Peach A/S |
Get the first full number | [0-9]+ | Will also match 123 in 123.456 |
Get the first decimal amount | [0-9]+\.[0-9]+ or [0-9]+,[0-9]+ | Does not match full number |
Get up to 3 characters from position 5 | .{5}(.{0,3}) | Will get the 0 to 3 characters after the first 5 characters. Does not retrieve anything if there are less than 5 characters. |
Get the first email address | [\w.-]+@[a-zA-Z\d.-]+.[a-zA-Z]{2,} | |
Get exactly 7 characters between parentheses | \((.{7})\) | Will not return anything if there are not exactly 7 characters between the parentheses or if there are no parentheses. |
A pattern of exactly 2 uppercase letters and exactly 5 digits between parentheses | \(([A-Z]{2}[0-9]{5})\) | Will not return anything if the pattern does not match between the parentheses or if there are no parentheses. |
Please visit this page if you need some more detailed information about Regular Expressions.