Check a Git commit message, for a valid JIRA ticket, using a Perl compatible regular expression match.
- Anywhere in the message
- Looks like MSG-100 EG_MSG-100 MESG-100
- Doesn't look like MSG-000 MSG-01 MSG-1234
NOTE: Will not work with valid ticket id ending in '-123'
(?s).*(?=\b[A-Z][A-Z_0-9]+-[0-9]+(?<!\-0|\-00|\-000|\-123)).*