title: Regular expression issue in javascript
body: <p>Im trying to get all the power calculations out of a string using reg exp's i tried the following code:</p>
  
  <pre><code>var regex = new RegExp('[0-9]+[^]{1}[0-9]+');
  regex.exec('1^2');
  </code></pre>
  
  <p>this works and returns 1^2 but when i try to use the following string:</p>
  
  <pre><code>regex.exec('1+1^2');
  </code></pre>
  
  <p>it returns <code>1+1</code></p>