title: how retrieve two numbers in string using regex
body: <p>I'm trying to retrieve the two integers (not floating numbers) from the following string:</p>
  
  <pre><code> 0 1 
   0 2 
   0 3 
   0 4 
   0 5 
   0 6 
   0 7 
   0 8 
   12 11
   10 22
   33 2
   102 149
  </code></pre>
  
  <p>I want to get in javasScript like:</p>
  
  <pre><code> var line = "0 1";
   var firstInt = line.someMagic();
   var secondInt = line.someMagic();
  </code></pre>
  
  <p>please help.
  Any help will be appreciated.
  thanks!</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>the split method can't be used. <br/> cos sometimes the line has <strong>extra space</strong> in front or at the <strong>end</strong> of <strong>each line</strong>!</p>
  
  <p>like:</p>
  
  <blockquote>
    <p>var line = " 0 2 ";</p>
  </blockquote>
  
  <p>that's why I needed the regex.</p>
  
  <p><strong>EDIT 2</strong></p>
  
  <p>Turns out, I don't need the regex! </p>
  
  <p>thanks for the help!</p>