Skip to main content
Question

Need Help with Extracting Specific Text Using Zapier Formatter's Extract Pattern Action


  • Beginner
  • 4 replies

 

 Hello Zapier Community,

I'm currently facing a challenge in extracting a specific part of a text string using Zapier Formatter's "Extract Pattern" action. Specifically, I need to extract the text that is sandwiched between the penultimate and final occurrence of the symbol '»' in a given string.

For instance, given the string 'עבודות אקדמיות » עבודות בחינם » למידה רגשית חברתית »', I aim to isolate and extract 'למידה רגשית חברתית'.

My current approach involves using Python's regular expressions. I tried using the following pattern in the Formatter's "Extract Pattern" action:

`'» ([^»]*) »$'`

The idea was to find the last occurrence of a string that starts with '» ', then includes any characters that are not '»' (this is what `[^»]*` does), and ends with ' »' at the end of the line (this is what `$` signifies).

However, this solution hasn't worked for me within Zapier. I would greatly appreciate if anyone could guide me to correctly write the regular expression or suggest an alternate solution for this problem. Thank you! 

Did this topic help you find an answer to your question?

2 replies

Troy Tessalone
Forum|alt.badge.img+14

Hi @osho 

Good question.

An alternative approach would be to use AI to parse the string.

Try OpenAI or ChatGPT in a Zap step with a prompt.


  • Author
  • Beginner
  • 4 replies
  • May 24, 2023

This is exactly what i did.