Jump to content

Email regex to do "respond above line"


billster
 Share

Recommended Posts

Hi all,

I would hope if you could help me figure out a regex to set up a =====respond to email above this line===== regex rule. I've set up an incoming rule that automatically updates the ticket in question, however, each time you email it then it would update the whole ticket with the whole email thread over and over again. How do I make it so it cuts off the old responses and only updates the ticket with the new responses?

I tried to create this regex, but for some reason it doesn't work in Hornbill.

^.*(?=\n=====respond to email above this line=====)

https://regex101.com/r/wYeCS3/1

Link to comment
Share on other sites

Hi @billster,

ASSUMING you are using this in the BP, there are a couple of things you need to know. The engine behind the scenes is ECMAScript and the RegEx you are likely going to want is:

([.\s\S]*)^=====respond to email above this line=====$

With the following flags:

gm/0,1

the "/0,1" is an undocumented selection mechanism we've added - use at your own risk.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...