Skip to main content

 

 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:

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

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! 

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.


This is exactly what i did.


Reply