title: Issue with escaped antislash before an escaped square bracket in regex
body: <p>I am having troubles with regex matching, when I have an antislash escaped before an escaped square bracket</p>
  
  <pre><code>import re
  
  def test_regex(test_number, regex_to_test, string_to_test):
      if re.match(regex_to_test, string_to_test) is None:
          print("Test #{0} FAILED ! Returned value was None".format(test_number))
      else:
          print("Test #{0} OK".format(test_number))
  
  #              REGEX APPLIED   STRING        REAL STRING
  test_regex(0, "\\\{\\\}",     "\\{\\}")     # \{\}
  test_regex(1, "\\\{\\\\\\\}", "\\{\\\}")    # \{\} or :\{\\} ???
  test_regex(2, "\\\{\\\\\\\}", "\\{\\\\}")   # \{\\}
  # Now we replace in test '{' and '}' respectively by '[' and ']'
  test_regex(3, "\\\[\\\]",     "\\[\\]")     # \[\]
  test_regex(4, "\\\[\\\\\\\]", "\\[\\\]")    # \[\] or :\[\\] ???
  test_regex(5, "\\\[\\\\\\\]", "\\[\\\\]")   # \[\\]
  # Extra incomprehensible
  test_regex(6, "\\\{\\\}",     "\{\}")       # {}
  test_regex(7, "\\\\{\\\\}",   "\{\}")       # {}
  # Now we replace in test '{' and '}' respectively by '[' and ']'
  test_regex(8, "\\\[\\\]",     "\[\]")       # []
  test_regex(9, "\\\\[\\\\]",   "\[\]")       # []
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Test #0 OK
  Test #1 OK
  Test #2 OK
  Test #3 FAILED ! Returned value was None
  Test #4 FAILED ! Returned value was None
  Test #5 FAILED ! Returned value was None
  Test #6 OK
  Test #7 OK
  Test #8 FAILED ! Returned value was None
  Test #9 FAILED ! Returned value was None
  </code></pre>
  
  <p>Why switching from '{' and '}' to '[' and ']' change everything ?</p>
  
  <p>How can I edit my regex to make tests #3 and #4 work as '{' and '}'?</p>