The default regex in Stash to match JIRA ID is
JVM_SUPPORT_RECOMMENDED_ARGS="-Dintegration.jira.key.pattern=\"((?<!([a-z]{1,10})-?)[a-z]+-\d+)\""
But it matches regardless where the JIRA ID's location.
I want it only matches from beginning:
- JIRA-1 what ever: match!
- something JIRA-1 else: not match
How to edit the regex?
Following don't work
\"^((?<!([a-z]{1,10})-?)[a-z]+-\d+)\"
and
\"(^(?<!([a-z]{1,10})-?)[a-z]+-\d+)\"
Solution:
^[a-z]+-\d+ will do.