Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Regexp mail handler doesn't separate the content of the email message

Grig August 8, 2019

Hi there!

Our Jira server sccessfully registers new issue comment from email. We have corporate standard to use personal decription in email. Such as

Best regards,
Ivan Ivanov
Senior accounter
tel. +7 555 555 55 55

And this decription are added to issue comment. We want to exclude anything from comment after separator "Best regards".

We've added Regexp mail handler with Split Regex param =
/(best(\s+)regards)|(_________*)|(-----\s.*?\s-----)/i

But this doesn't work, description are added to comment still.
When we use separator "__________________", description are sccessfully excluded from comment.

__________________
Best regards,
Ivan Ivanov
Senior accounter
tel. +7 555 555 55 55

What regex we should use for separator "Best regards"?

2 answers

0 votes
Grig August 8, 2019

Hi Jack.

Thank you for your reply. It doesn't work. Because commas aren't allowed in Split Regex param.

Add a comment before a specified marker or separator in the email body

0 votes
Jack Nolddor _Sweet Bananas_
Atlassian Partner
August 8, 2019

Hi

What about if you add the final comma to the regex expr?

EDIT:

/(Best(\s+)regards.*)|(_________*)|(-----\s.*?\s-----)/i

 


Does it work?
Regards

Grig August 8, 2019

Hi Jack.

Thank you for your reply. It doesn't work. Because commas aren't allowed in Split Regex param.

Add a comment before a specified marker or separator in the email body

Jack Nolddor _Sweet Bananas_
Atlassian Partner
August 9, 2019

I've edited my suggestion, could you try again with this new one?

Grig August 9, 2019

Nope, new regex doesn't work. Entire email body is added in issue comment.

Suggest an answer

Log in or Sign up to answer