Jira Issue Key Regex ^new^
| Input | Expected Match? | |-------|----------------| | PROJ-1 | Yes | | A-9999999 | Yes | | MYPROJECT-42 | Yes | | proj-1 | No (lowercase) | | PROJ-abc | No (letters in number part) | | PROJ--123 | No (double hyphen) | | PROJ_123 | No (underscore instead of hyphen) | | PROJ123 | No (missing hyphen) | | PROJ-123 more text | Yes (extracts PROJ-123 ) | | 123-PROJ | No | | ABC-012 | Yes (though 012 is unusual, still digits) |
Capture group 1 = project key, group 2 = issue number. jira issue key regex
pattern = r'\b[A-Z]+-[0-9]+\b' text = "Fix PROJ-123 and ABC-99, ignore 123-456" keys = re.findall(pattern, text) print(keys) # ['PROJ-123', 'ABC-99'] | Input | Expected Match
Based on Atlassian’s documentation and common implementation across their products (Jira Cloud, Data Center, Bitbucket, Bamboo), the for a single Jira issue key is: ignore 123-456" keys = re.findall(pattern







