title: Why "abcdef" is not matched by (?=abc)def but matched by abc(?=def)?
body: <p>In Javascript, I have a string <code>abcdef</code> and cannot figure out this strange behavior:</p>
  
  <ul>
  <li><code>(?=abc)def</code> doesnt match the string</li>
  <li><code>abc(?=def)</code> does match the string</li>
  </ul>
  
  <p>Why?</p>