title: sre_constants.error: unexpected end of regular expression - Should Work Fine
body: <p>So I'm doing a little bit of testing for something and I require a method of splitting a string into groups of two. (e.g. <code>'abcdef' =&gt; ['ab','cd','ef']</code>)</p>
  
  <p>I'm trying to use a regex pattern to do this (<code>[^]{2}</code>). Whenever I try to compile this pattern, I get the error message:  </p>
  
  <blockquote>
    <p>sre_constants.error: unexpected end of regular expression</p>
  </blockquote>
  
  <p>The exact line of code is:<br>
  <code>pat = re.compile(r'[^]{2}')</code></p>
  
  <p>Could someone please tell me what I'm doing wrong here? I've done a lot of searching but a lot of the problems were related to incorrect usage and/or backslashes.</p>
  
  <p>I thought about it possibly being because of string formatting, though the Python docs didn't mention anything about any issues.</p>