title: optional regex match?
body: <p>How can I match an optional character in a regex expression?</p>
  
  <p>I am trying to write a small file that does a little housekeeping to our NAS.</p>
  
  <p>The script goes through the folders inside the specified root folder.</p>
  
  <p>For my testing the root is <code>C:\Users\Solignis\Desktop\Orders</code></p>
  
  <p>This is where I have the first match take place, it checks to be sure the file matches our standard name convention which is the city + 3 digit folder + 3 digit file number.</p>
  
  <p>Sometimes though we have extra files that have a <code>_1 or _2</code> on them to denote an additional page.</p>
  
  <p>How can I make this regex expression also fit the "optional" <code>_1 or _2 and sometimes _3</code> into the match?</p>
  
  <p>The code:</p>
  
  <pre><code>$file =~ /^ ((C[A|F|L]|ME)) (\d{3}) (\d{3}) \. (PDF) /xmi
  </code></pre>
  
  <p>I am sure this is easy bit I still got loops on the brain from having to "drill" into this giant hash of arrays I made which is something like 25k files in some of the arrays.</p>
  
  <p>Any help would be much appreciated.</p>
  
  <p>Thanks</p>