Forums

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

Extracting content from description in Automate

Mindjito December 13, 2023

Hey everyone,

I am currently working email logs (so email to issue) and connecting it to another issue. So currently when I receive an e-mail, it creates a task and everything is correct, but it is a stand alone task. I want to connect this via e-mail.

What REGEX code is needed to extract the e-mail from this description:

[Created via e-mail received from: Mindjito <swamprjvm3@gmail.com>]

And while I am here, is it possible to disable that jira removes the e-mails. I solved it differently, but just not deleting would work best.

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 13, 2023

Hi @Mindjito 

I recommend performing an internet search for "regular expression to find email address in text", and then try using any suggested results.

And, as the regular expression and match() function behavior for rules are not fully described, I recommend testing for a variety of scenarios in your rule: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#match--  You may find that suggested regular expressions work differently in automation rules than they do in other tools / programming languages.  In general, I suggest using the simplest regular expression that can possibly work, rather than a more complex one to handle edge cases.

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer