Strip E-Mail text starting from any Quote

Hi,

The Mailhook receive emails that sometimes contain a quote. As I want to handover this to an AI Bot, I have to remove the qupte.

An E-Mail Text for example Look like this

"Hello,

This is a Test

Only me

On Fri, Apr 19, 2024, Joe Sixpack wrote:

Blablabla…"

So, I want as Output of the Text Parser only the Part until "On " … but I did not get this work.

Any ideas? Maybe Text Parser is not the right way to do it?

Frank

I think a text parser is the right module for the job. Can you share what you’ve done with it so far so that we can see what’s not right?

samliewrequest private consultation

2 Likes

Nothing that I tried work, the Output was always empty or no Output et all.

You can use the built-in function replace

\s+On[\w\W]+?wrote:[\w\W]+

Proof https://regex101.com/r/g4VSVA

  • Use the replace function to replace it with emptystring.
2 Likes

GREAT. That is working. Many thanks.

No problem, glad I could help!

1. If you have a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.

2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.

This marks the topic as solved, so that:

others can save time when catching up with the latest activity here, and

  • allows others to quickly jump to the solution if they come across the same problem

To do this, simply click the checkbox at the bottom of the post that answers your question:
Screenshot_2023-10-04_161049

3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!

For more information, see Text Parser in the Make Help Center:

Match Pattern
The Match pattern module enables you to find and extract string elements matching a search pattern from a given text. The search pattern is a regular expression (aka regex or regexp), which is a sequence of characters in which each character is either a metacharacter, having a special meaning, or a regular character that has a literal meaning.

Hope this helps!

samliewrequest private consultation

2 Likes