title: JavaScript RegEX explicit character matches only once
body: <p>I need a regular expression that has the following constraints:</p>
  
  <ol>
  <li><p>Contains only <code>[A-Z0-9.*]</code> characters</p></li>
  <li><p>Is 1 to 15 characters in length</p></li>
  <li><p>Must contain a <code>*</code> but only once.</p></li>
  </ol>
  
  <p>Therefore, the following assertions:</p>
  
  <ul>
  <li>ABC.123 <strong>invalid</strong> (no stars)</li>
  <li>ABC.123* <strong>valid</strong> (star at end)</li>
  <li>*ABC.123 <strong>valid</strong> (star at beginning)</li>
  <li>ABC.*123 <strong>valid</strong> (star in the middle)</li>
  <li>*ABC.123* <strong>invalid</strong> (more than one star) </li>
  </ul>
  
  <p>My goal was to only have a single expression. I could obviously have an expression that asserts the first two constraints: <code>[A-Z0-9.*]{1,15}</code> and then a second expression to assert the third constraint <code>\*{1}</code>. </p>
  
  <p>Is it possible to have an expression that essentially validates the overall structure of a string input, but then rewinds and re-evaluates the string with another expression?</p>