7min

RegEx Extract

RegEx Extract is one of the most useful Actions that you can add to your flows. It will allow you to automate the way you work with documents inside your flows.

Scenario

As a user I want an action that extracts all the emails from a document/string based on RegEx validations and saves them into a list. This action will help me extract from a strings only the values that validates with the RegEx expression and in this scenario I will extract a list of emails that I could use for marketing purposes.

How to

1. Create a new process and give it a name.

2. Drag the Regex Extract action to the canvas and link it to the other actions.

Document image

3. Click the Regex Extract action to access its configurations and click the button Regex Configurations.

Document image

ο»Ώ

  • ο»Ώ<%texttoextractfrom%> - variable that awaits the text to search in, it will ask for the text every time the process is ran (this is an input variable).
  • ο»Ώ<%regexexpression%> - variable that has the Regex Value saved as Default value. The Regex that looks for email addresses is "([_\.0-9a-zA-Z-][email protected]([\-0-9a-zA-Z]+\.)+[a-zA-Z]{2,6})".
  • ο»Ώ<%listofemails%> - the list that will contain all the emails present in the text you entered in the first variable.

If you wish to search the text regardless of case check the Ignore case checkbox.

Document image

5. Save and Validate the process.

6. Each time you will run the process you are expected to add the text you wish to check.

Document image

7. Because we have created ο»Ώο»Ώ<%listofemails%> of type output, when you click Check instances you will be able to see that the email addresses were saved in the list.

Document image

ο»Ώ

Updated 27 Apr 2022
Did this page help?
Yes
No