Skip to main content

Hey guys,

I’m struggling with the Regex code in a formatter Zap. I’m trying to extract the “Name” attribute from the following string, but my regex code doesn’t seem to work in Zapier, as I keep getting an empty result.

 

“Name: Tester E-mail: Tester@gmail-email-com.com


This is my formula:

/(?<=Name: )(.*)(?= E-mail:)/g

 

Can anybody spot my error?

 

Help would be much appreciated!

Hi @jojo69!

So in the text you showed, are you only interested in getting the word “Tester”? And will the data always come in that same format?

If so, this should work for you (I used Chat GPT to get the answer because RegEx eludes me, no matter how hard I try haha):

(?<=Name: )\b\w+\b


Hi @jojo69 

Good question.

Some other options:

  1. You can use multiple Formatter > Text > Split steps to isolate the desired value.
  2. You can use OpenAI > Send Prompt to have AI isolate the desired value.
  3. You can use a Code step:

 


Thanks @nicksimard, that did the trick!

 

Cheers


Reply