Best answer

Help with Regex Expression Code

  • 30 November 2021
  • 2 replies
  • 67 views

Hi everyone, I’m new to Zapier and Regex and I’m trying to extract a paragraph between multi lines. I’ve tried it on regex101 and it works, but it doesn’t work in Zapier. May I know if anyone can give some advises? Cheers!

 

Please kindly find the details below:

 

Input:

07110613 — Reva Joshi to Deliveroo Only

@HK ASM  Hi,All photos are uploaded except for no matching items.
- 兩三碗車仔麵_油菜
- 兩三碗車仔麵_豬手淨食
- 兩三碗車仔麵_車仔麵
 


View post in Deliveroo:

 

Pattern I used:

(?<=Deliveroo Only\n\n)((.|\n)*)(?=\n\n\nView post)
 

Regex101 screenshot

 

 

icon

Best answer by Troy Tessalone 30 November 2021, 15:46

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 7
Badge +14

Hi @dennis.lau 

You can use a Code step to do this parsing: https://zapier.com/apps/code/help

The split() method will work: https://www.w3schools.com/jsref/jsref_split.asp

 

Code config

 

Code results

 

Thanks Troy! It solves my problem!