title: Regular expression for a JIRA identifier
body: <p>I'm trying to extract a JIRA identifier from a line of text.</p>
  
  <p>JIRA identifiers are of the form [A-Z]+-[0-9] - I have the following pattern:</p>
  
  <pre><code>foreach my $line ( @textBlock ) {
      my ( $id ) = ( $line =~ /[\s|]?([A-Z]+-[0-9]+)[\s:|]?/ );
      push @jiraIDs, $id if ( defined $id &amp;&amp; $id !~ /^$/ );
  }
  </code></pre>
  
  <p>This doesn't cope if someone specifies some text which contains the pattern inside another string - for example <code>blah_blah_ABC-123</code> would match upon ABC-123. I don't want to mandate that there must be a space or other delimiter in front of the match as that would fail if the identifier were at the start of the line.</p>
  
  <p>Can anyone suggest the necessary runes?</p>
  
  <p>Thanks.</p>