Regex not working when trying to remove the signature from incoming mails through the mail handler


i would like to get rid of those annoying mail signatures when our employees comment on a ticket via mail. Our format is sth like this:

The actual comment
*Firstname Lastname* 
<the signature>

I want to chop of everything after the comment, so the firstname / lastname part and everything that follows.

I have build the following RegEx and verified that it is working in a text editor supporting regex:


However, when i configure a new mail handler via "Add a comment before a specified marker or separator in the email body" and using this regex, the signatures are not touched at all. Obviously I also tried it with the slash delimited, changing it to this:


But this does also not work at all.

Could it be the issue that our mails are HTML mails and that the regex is applied before the mail is converted to text so that it can be added as comment?

1 answer

I have been having a similar problem recently and have been using the debug email logs and

to validate the regex in the incoming mail handler.


There seems to be an 80 char limit in the regex though.

We mainly use Outlook but there are a number of iOS and Android phone users that don't match the pattern.



So are you in the same boat as me or did you manage to solve this issue? I tried different variations but gave up eventually.


I currently have 

  • Split Regex: /(\(JIRA\).(w|W)rote)|((O|o)r.*l.(M|m)e.*e.*)|((F|f)rom: jira-marin.*)|(___)/

to try and catch replies to JIRA sent messages

Linux mail appends : On <date> (JIRA) Wrote

Outlook Text emails appends : "Original Message" or "Original message"

Some androids use: From: jira-marin.... (our JIRA email account)

Some people include a line break in their signatures: ____


This regex string complains if I add any more characters to it. The error flashes up briefly when I click save and states that it cannot be more than 255 characters but it actually means 80.




Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,934 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot