The CreatorCon Call for Content is officially open! Get started here.

How do I access the returned value for "match Regex" in inbound action?

jeffmanville
Kilo Contributor

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:

find_real_file.png

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.

1 REPLY 1

Abhinay Erra
Giga Sage

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