equal
deleted
inserted
replaced
2168 class _re(object): |
2168 class _re(object): |
2169 def _checkre2(self): |
2169 def _checkre2(self): |
2170 global _re2 |
2170 global _re2 |
2171 try: |
2171 try: |
2172 # check if match works, see issue3964 |
2172 # check if match works, see issue3964 |
2173 _re2 = bool(re2.match(r'\[([^\[]+)\]', b'[ui]')) |
2173 _re2 = bool(re2.match(br'\[([^\[]+)\]', b'[ui]')) |
2174 except ImportError: |
2174 except ImportError: |
2175 _re2 = False |
2175 _re2 = False |
2176 |
2176 |
2177 def compile(self, pat, flags=0): |
2177 def compile(self, pat, flags=0): |
2178 """Compile a regular expression, using re2 if possible |
2178 """Compile a regular expression, using re2 if possible |