title: What is the proper regular expression for an unescaped backslash before a character?
body: <p>Let's say I want to represent <code>\q</code> (or any other particular "backslash-escaped character").  That is, I want to match <code>\q</code> but not <code>\\q</code>, since the latter is a backslash-escaped backslash followed by a <code>q</code>.  Yet <code>\\\q</code> would match, since it's a backslash-escaped backslash followed by a backslash-escaped <code>q</code>.  (Well, it would match the <code>\q</code> at the end, not the <code>\\</code> at the beginning.)</p>
  
  <p>I know I need a negative lookbehind, but they always tie my head up in knots, especially since the backslashes themselves have to be escaped in the regexp.</p>