By default, Jira is started with the following value for the stash.jira.key.pattern argument:
((?<!([A-Z]{1,10})-?)[A-Z]+-\d+)
To ignore case, I was thinking of changing this to:
\b(\p{Alpha}+-\p{Digit}+)\b
Here I have omitted the negative lookbehind term:
([A-Z]{1,10})-?)
I know I could just include it or modify it in a simlar way:
((?<!(\p{Alpha}{1,10})-?)\p{Alpha}+-\p{Digit}+)
But what am I losing by not including it?
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.
Cheers,
Michael
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:
([A-Z]{1,10})-?)
and not:
[A-Z]{1,10}-
Or, for that matter, why not just the dash, so that the expression becomes:
((?<!-)[A-Z]+-\d+)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.