title: Bracket in regexp and as string (elisp)
body: <p>I am creating a bracket/parenthesis completer function, much like packages like auto-pair.</p>
  
  <p>I have the combinations stored in <code>alist</code> like: <code>("[" . "]")</code>.</p>
  
  <p>When I try to use the <code>(car (car my-alist))</code> as a regexp, in <code>(looking-back REGEXP)</code>, 
  this does not work because it sees this as <code>"["</code>, which, instead of a string, is an incomplete regexp:</p>
  
  <p><code>looking-back: Invalid regexp: "Unmatched [ or [^"</code></p>
  
  <p>How do I use this so that it will still be possible to insert it as a string from <code>(car (car my-alist))</code> (so "["), while also being able to use "[" as a regexp?</p>
  
  <p>Note that this does work for <code>"("</code>, since this is not a special regexp character.</p>