https://confluence.atlassian.com/display/BitbucketServerKB/Integrating+with+custom+JIRA+issue+key gives a regex to use in BBS (Stash) for issues keys such as ABC-123
((?<!([A-Z]{1,10})-?)[A-Z]+-\d+)
But is lookbehind really needed in the pattern?
The lookbehind is used to ensure that a string like ABC-DEF-123 is not matched as DEF-123. Note that this type of pattern is used in Crucible review IDs and sometimes in Bamboo build keys.
ABC-DEF-123
DEF-123
It looks like you're new here. Sign in or register to get started.