Shirley Henderson
Shirley Henderson

Reputation: 11

How do I use expressions to parse data from email?

I am using Microsoft flow to bring email data into a spreadsheet. I need to pull customer # from the subject (numeric string always at the end) & date/time stamp from body. Completely ignorant as to how to use expressions to parse the data I need. Can someone help?

Below are examples of said subject & body:

Subject:  00:02:52 - Michael Weslosky truck 803690(610) SN: G85A210B2E5C arrived at customer V7880

Body:  David Shiflett, 796969(613) SN: G8FC2109E436 arrived at 62519 - 1046 Millwood Pike, Winchester, VA 22602, USA on 06/12/20 20:56:46. The odometer reading was 160,566 miles at the time of arrival.

Upvotes: 1

Views: 34

Answers (1)

player0
player0

Reputation: 1

try:

=ARRAYFORMULA(IFNA(IFNA(
 REGEXEXTRACT(A2:A, "customer (.+)$"), 
 REGEXEXTRACT(A2:A, "\d+/\d+/\d+ \d+:\d+:\d+"))))

0

Upvotes: 1

Related Questions