What is the default stash jira key pattern doing?

By default, Jira is started with the following value for the stash.jira.key.pattern argument:


To ignore case, I was thinking of changing this to:


Here I have omitted the negative lookbehind term:


I know I could just include it or modify it in a simlar way:


But what am I losing by not including it?

1 answer

1 accepted

1 vote
Accepted answer

Hi Ken,

The negative lookbehind is used to make the JIRA key matching a bit stricter. Specifically, it ensures that things like Crucible review keys (e.g CR-FE-1234) and Bamboo builds (e.g. STASH-MASTER-1234) are not matched. If you leave it off, you'll probably get a few more false positives.



I can see that case but what does making the first dash optional acheive? And why is it captured? That is, why is the term:


and not:


Or, for that matter, why not just the dash, so that the expression becomes:


Okay. The original is not looking for a word boundary like I was going to do. I am going to try:

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,125 views 4 9
Read article

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