title: How can I match the \0 character in a regex in C++?
body: <p>I need to match the text '\0' with the same regex that I would match 'a' or 'b'.  (a regex for a character constant in C++).  I've tried a bunch of different regexes, but haven't gotten a successful one yet.  My latest attempt:</p>
  
  <pre><code>^['].|\\0[']
  </code></pre>
  
  <p>Most of the other things I've tried have given seg faults, so this is really the closest I've gotten.</p>