Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Regex format for case-insensitivity in Automation for Jira Edited

I am using the new Automation for Jira functionality (used to be a 3rd party plugin) to use regex to parse a comment which is created by email. Once parsed, a transition should occur. 

I am using an If block to compare two values where {{comment.body}} contains regex.

The docs indicate that regex expressions should look like this:

(Jira|BitBucket|Confluence)

What I need to do is to add a /i flag for case insensitivity. All attempts seem to fail. Should there be single or double quotes around the expression?

My regex looks like this in the field (fails):

(~~status:\s*done\s*)/gmi

If I remove the trailing flags, it works, but case-sensitive.

The visual summary on the left side looks like this:

2020-08-01_08-08-03.png

What am I doing wrong? Should I wrap the expression in single or double quotes? Some kind of Java (or other) flavor of regex delimiters?

Thanks!!

 

 

 

 

2 answers

1 accepted

1 vote
Answer accepted
Eric Atlassian Team Aug 07, 2020

Hi @Mike Tocci 

 

So basically we are using Java regex flavour. To make a case insensitive match, prefix your pattern with (?i)

 

Using the example from the docs, to make it case insensitive you'd write (?i)(Jira|BitBucket|Confluence) instead.

 

Hope that helps.

Hi @Eric -- this is exactly the answer I was looking for. Thanks!!

Hi @Eric 

I am struggling with your solution. 

In general I am trying to create an automation which should remain an issue resolved if a customer only answers something like "thanks".

Otherwise, e.g. if something in the solution does not work and the customer gets back to us the issue should be re-opened.

Please find more details here 

Since today I looks like it is kind of working however facing a issues with the case sensitive: 

ReopenIssueBasedOnComment.png

currently when the ticket as resolved and the customer answer with "thanks" the ticket will remain closed.

 

As soon as I add the (?i) in front of the regex the ticket will reopen - any idea what I am doing wrong ? 

so my regex is: 

(?i)(tha?n?ks?|thx|dank*|merci|tia|tnx|grazie|gracia)

 

no clue what I did wrong but it works today

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

New Cloud Apps Roundup - Spring 2021

Atlassian's marketplace partners have had a very productive start to 2021! Since our last roundup, our developer community has added over 160 new cloud apps to the Atlassian Marketplace to help you...

182 views 3 19
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you