title: Javascript Regex Match()
body: <p>I just want this function to return an int back based on a string but its not working
  It will be either H or V followed by 1 or 2 digits.</p>
  
  <pre>
  IE: H1         return 99
      H09        return 91
      H10        return 90
      H50        return 50
      V1         return 1
      V05        return 5
      V11        return 11
      V50        return 50
  </pre>
  
  <p>spot will be my string thats going in.</p>
  
  <pre><code>get100YardVersionEugene: function(spot)
  {
          var team = spot.match(/[A-Z]+/);
          var yard = spot.match(/([0-9]+)/);
  
          if (team == "H")
          {
              return 100-yard;
          }
          else //V
          {
              return yard;
          }
      },
  </code></pre>
  
  <p>for some reason when its V9(or H9) it breaks but when i put in V09 it works.</p>
  
  <p>Can someone tell me why?</p>
  
  <p>EDIT: it breaks as in... 
  I have two variables start and end</p>
  
  <p>so i have something like 
  start = get100YardVersionEugene("V9")<br>
  and I use start and end to draw it on html5 canvas</p>
  
  <p>start = get100YardVersionEugene("V9")  //doesn't draw correctly
  start = get100YardVersionEugene("V09")  // draw correctly</p>