I have an email in HTML format containing text and tables that I am trying to parse using javascript. The text parsing works just fine, I like just have to run a regex to get what I need from the content, e.g.:
var name = mail.bodyText.match(/Name:\s*(.*)/);
Now the table part is quite tricky. Say the table contains 3 columns and I only want to retrieve data from the first column where associated data is listed. When I type the following:
var column1Data = mail.bodyText.match(/Column1([\s\S]*?)/);
if (column1Data) {
var column1DataSplit = sources[1].split("\n");}
}
Data is not retrieved.
Example of a html table:
Any idea on how to retrieve a html table bodyText?
Thanks.