How do I access the returned value for "match Regex" in inbound action?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2016 08:45 AM
Hello,
So, I am trying to pull a string from an email that matches a certain regex pattern. I am using this to dynamically set a different field.
I am using this condition:
and a switch case statement script to set the correct value.
However, I have no idea what to put to grab the values the match Regex pattern found.
Labels:
- Labels:
-
Scripting and Coding
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2016 09:11 AM
Jeff,
Just use email.body_text.match(/your pattern goes here/g);. this will get you an array of all the matches found
var result=email.body_text.match(/your pattern goes here/g);
Thanks,
Abhinay
PS: Hit like, Helpful or Correct depending on the impact of the response