title: perl regex character classes
body: <p>i'm having trouble regex grouping in perl.</p>
  
  <p>of course this is a much larger problem but it's the same concept i'm dealing with. thank you all in advance for your comments and ideas.</p>
  
  <p>the regex below should only care about this portion of the string to make a decision. </p>
  
  <blockquote>
    <p>doctor_who:ee</p>
    
    <p>doctor_who:ep</p>
    
    <p>doctor_who:ex</p>
  </blockquote>
  
  <p>but not </p>
  
  <blockquote>
    <p>doctor_who:eeh</p>
  </blockquote>
  
  <p>code:</p>
  
  <pre><code>$str = "doctor_who:ee123ABC451234.123"; #match
  $str = "doctor_who:ep123YXZ451234.123"; #match
  $str = "doctor_who:ex123451234.123"; #match
  $str = "doctor_who:eeh1234LMNOP51234.123";  ##should not match
  $str = "doctor_who:abc12341234.123";  ##should not match
  
  $regex = "doctor_who:e[e|p|x]"; #---&gt;problem, what to add/remove?
  
  if ($str =~ m/$regex/){
     print "match!";
  }
  else {
     print "not matched\n";
  }
  </code></pre>