I’m trying to parse an email using the Text Parser (Match Pattern) module with the extraction of multiple variables.
Here’s sample text that’s being evaluated:
A customer has left you feedback from their order. CUSTOMER 2494157 SENT FEEDBACK
Order Number 6669 Customer Email ddsfsf98@gmail.com Customer Name Jane Smith Comments Star Rating 5
Here’s the regex I’m using:
(?<email>(?<=Email )([\s\S]*?)(?= Customer))|(?<order>(?<=Order Number )([\s\S]*?)(?= Customer))|(?<name>(?<=Customer Name )([\s\S]*?)(?= Comments))|(?<comments>(?<=Comments )([\s\S]*?)(?=Star))|(?<rating>(?<=Star Rating )([\s\S]*?)(?= -))
When I run the module, it’s only returning the order group (which is the first one found in the string). I’ve tried using the Global Match yes option but that results in an error due to an infinite loop.
What am I doing wrong? It validates fine in testers. Just not returning all of the values in Make.