Parse email data using Regular Expressions
MailtoX Desktop allows you to parse and export the content of the email message. In this tutorial, we will parse data from Gmail and export it to Excel.
1. You need to run the ExtractEditor
2. Select and insert a "BatchExtract Job" by clicking on it
3. Select the Bach Extract job action and click on the Gmail action on top
The Gmail dialog allows you to select the folders that you want to process.
4. Highlight the Gmail Action and insert an Extract Data action by selecting it from the actions list on top:
We want to parse text from the text part of the messages and from the sender email address so we first define both fields. When you click on (2) "Add Email Fields" both fields will be added to the defined fields list (1):
Click on the RegEx tab. Here you have the possibility to use a regular expression to extract data from the defined fields:
For instance when you write the following regular expression from the from Address: "(?s)@.+" and you click on test (2) you will get as a result the domain part. (Result = "@Amazon.com")
Click on (3) "Load Test Data" to open an email and load data that will help you to verify your regular expressions with real data.
5. Insert a "Collect Data" (1) and a "Columnar" action (2)
When you press on "Execute Job" (3) the data will be exported to the defined excel sheet.