title: Regular Expression for Alphabets + Numeric Value
body: <p>I am working on a Java-script, for which I need regular expression to check whether the entered text in text-box should be combination of alphabets and numeric value. </p>
  
  <p>I tried NaN function of java-script but string should be of minimum-size &amp; maximum-size of length 4 and start with Alphabet as first element and remaining 3 element should be numbers.</p>
  
  <p>For example : Regular expression for A123, D456, a564 and not for ( AS23, 1234, HJI1 )</p>
  
  <p>Please suggest me !!!</p>
  
  <p>Code Here:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    var textcode = document.form1.code.value;
    function fourdigitcheck(){
      var textcode = document.form1.code.value;
      alert("textcode:"+textcode);
      var vmatch = /^[a-zA-Z]\d{3}$/.test("textcode");
      alert("match:"+vmatch);
      }
  &lt;/script&gt;
  &lt;form name="form1"&gt;
   Enter your Number  &lt;input type="text" name="code" id="code"   onblur="fourdigitcheck()" /&gt;
  &lt;/form&gt;
  </code></pre>