title: Test filename with regular expression
body: <p>I am trying to test a filename string with this pattern:</p>
  
  <pre><code>^[A-Za-z0-9-_,\s]+[.]{1}[A-Za-z]{3}$
  </code></pre>
  
  <p>I want to ensure there is a three letter extension and allow letters, numbers and these symbols: - _ , \s to precede it but I don't want to have to include all of the letters and characters in the filename. I could just use a * instead of a + but that would match 0 or more which wouldn't be a valid filename. </p>
  
  <p>Here are some examples of how the rule should react:</p>
  
  <pre><code>Correct file name.pdf - true
  Correct, file name.pdf - true
  Correct_file_name.pdf - true
  Correctfilename.pdf - true
  Incorrect &amp;% file name.pdf - false
  Incorrect file name- false
  </code></pre>
  
  <p>It would be great if someone could point me in the right direction.</p>
  
  <p>Thanks</p>