When you use data fields in different parts like saving email to a folder, or print email with fields, you can extract only a part of the data. That's useful when you have long string and want to get only a part like an email or an order number.
Example: You want to save email in a folder using the email unique id as part of folder or filename, but it is very long %22456464xcvrg4vcv@sgdcv12%, you want to keep only the last 4 digits so you can use the function: RIGHT(%EMAIL_ID%, 4).
The available functions are:
- LEFT(field,X) = extract the X number of characters from the start (for example LEFT("Order received from King of Flowers", 5) return "Order")
- RIGHT(field,X) = extract the X number of characters from the end (for example RIGHT("Order received from King of Flowers", 7) return "Flowers")
- MID(field,X,Y) = extract the Y number of characters from the X position (for example MID("Order received from King of Flowers", 6, 8) return "received")
- REGEX() = use regular expressions to extract data, this function is particular and requires some computer skills. For more information on RegEx please check these sites:
https://blog.usejournal.com/regular-expressions-a-complete-beginners-tutorial-c7327b9fd8eb
Here some basic examples to use REGEX in the fields: - Extract all numbers in the email subject field: REGEX(%EMAIL_SUBJECT%,[0-9]+) - Exclude the characters #: in the attachment filename: REGEX(%FILENAME_FULL%,[^#]) - Exclude the characters FW: in subject of email: REGEX(%EMAIL_SUBJECT%,[^FW:])
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article