title: Differences between Ruby 1.9 and Javascript regexp
body: <p>Apart from Javascript's <code>^</code> and <code>$</code> being equivalent to Ruby's <code>\A</code> and <code>\z</code>, what other subtle differences are there between the two regular expression engines?</p>
  
  <p>I'm looking for subtle differences where the same regex might behave differently, for example <code>/^abc$/</code> will match this in Ruby:</p>
  
  <pre><code>123
  abc
  def
  </code></pre>
  
  <p>But it won't match in Javascript.</p>