title: using reg exp to check if test string is of a fixed format
body: <p>I want to make sure using regex that a string is of the format-  "999.999-A9-Won" and without any white spaces or tabs or newline characters.</p>
  
  <ol>
  <li>There may be 2 or 3 numbers in the range 0 - 9.</li>
  <li>Followed by a period '.'</li>
  <li>Again followed by 2 or 3 numbers in the range 0 - 9</li>
  <li>Followed by a hyphen, character 'A' and a number between 0 - 9 .</li>
  <li>This can be followed by anything.</li>
  </ol>
  
  <p>Example: 87.98-A8-abcdef</p>
  
  <p>The code I have come up until now is:</p>
  
  <pre><code>testString = "87.98-A1-help"
  regCompiled = re.compile('^[0-9][0-9][.][0-9][0-9][-A][0-9][-]*');
  checkMatch = re.match(regCompiled, testString);
  if checkMatch:
      print ("FOUND")
  else:
      print("Not Found")
  </code></pre>
  
  <p>This doesn't seem to work. I'm not sure what I'm missing and also the problem here is I'm not checking for white spaces, tabs and new line characters and also hard-coded the number for integers before and after decimal.</p>