def METHOD_NAME(self):
    """Test compiling patterns that fail with regex.V1 but work with regex.V0"""
    entity_name = 'test'
    pattern = '[[\\]]'
    text = 'this pattern should extract box brackets [] [][[[ ]]]]]'
    expected_values = ['[', ']', '[', ']', '[', '[', '[', ']', ']', ']', ']', ']']
    expected_original_texts = ['[', ']', '[', ']', '[', '[', '[', ']', ']', ']', ']', ']']
    regex_detector = RegexDetector(entity_name=entity_name, re_flags=RegexDetector.DEFAULT_FLAGS, pattern=pattern)
    self.assertTrue((regex_detector.pattern.flags & re.V1) == 0)
    self.assertTrue((regex_detector.pattern.flags & re.V0) != 0)
    values, original_texts = regex_detector.detect_entity(text)
    self.assertEqual(values, expected_values)
    self.assertEqual(original_texts, expected_original_texts)
    pattern = '[[]]'
    text = 'this pattern should extract box brackets pairs [] [][[[ ]]]]]'
    expected_values = ['[]', '[]']
    expected_original_texts = ['[]', '[]']
    regex_detector = RegexDetector(entity_name=entity_name, re_flags=RegexDetector.DEFAULT_FLAGS, pattern=pattern)
    self.assertTrue((regex_detector.pattern.flags & re.V1) == 0)
    self.assertTrue((regex_detector.pattern.flags & re.V0) != 0)
    values, original_texts = regex_detector.detect_entity(text)
    self.assertEqual(values, expected_values)
    self.assertEqual(original_texts, expected_original_texts)