title: Validate string format
body: <p>I had a list of different formats for the string. When a string produces a string of something, the users must key-in the format of that particular string.</p>
  <p>If the given string are</p>
  <blockquote>
  <p>A-01-13A</p>
  <p>(One alphabet, follow by dash, two numbers, follow by dash, two numbers, and one alphabet)</p>
  </blockquote>
  <p>or</p>
  <blockquote>
  <p>A-01-13</p>
  <p>(One alphabet, follow by dash, two numbers, follow by dash, two numbers)</p>
  </blockquote>
  <hr />
  <p>The user's key-in string is <strong>validated</strong> below:</p>
  <blockquote>
  <p>B-13-99</p>
  <p>B-14-11A</p>
  </blockquote>
  <p>The user's key-in string is <strong>NOT validated</strong> below:</p>
  <blockquote>
  <p>B-13-100</p>
  </blockquote>
  <hr />
  <p>What is the best way to validate the given string using Regex or other methods in Javascript?</p>