title: What is a regex to match ONLY an empty string?
body: <p>There are lots of posts about regexs to match a <em>potentially</em> empty string, but I couldn't readily find any which provided a regex which <em>only</em> matched an empty string.</p>
  
  <p>I know that <code>^</code> will match the beginning of any line and <code>$</code> will match the end of any line as well as the end of the string. As such, <code>/^$/</code> matches far more than the empty string such as "\n", "foobar\n\n", etc.</p>
  
  <p>I would have thought, though, that <code>/\A\Z/</code> would match just the empty string, since <code>\A</code> matches the beginning of the string and <code>\Z</code> matches the end of the string. However, my testing shows that <code>/\A\Z/</code> will also match "\n". Why is that?</p>