Lines Matching refs:compile
29 x = re.compile('ab+c')
121 pattern = re.compile('.')
125 self.assertRaises(ValueError, re.compile, pattern, re.I)
129 re.compile("(?P<quote>)(?(quote))")
187 re.compile('(?P<a>x)(?P=a)(?(a)y)')
188 re.compile('(?P<a1>x)(?P=a1)(?(a1)y)')
189 self.assertRaises(re.error, re.compile, '(?P<a>)(?P<a>)')
190 self.assertRaises(re.error, re.compile, '(?Px)')
191 self.assertRaises(re.error, re.compile, '(?P=)')
192 self.assertRaises(re.error, re.compile, '(?P=1)')
193 self.assertRaises(re.error, re.compile, '(?P=a)')
194 self.assertRaises(re.error, re.compile, '(?P=a1)')
195 self.assertRaises(re.error, re.compile, '(?P=a.)')
196 self.assertRaises(re.error, re.compile, '(?P<)')
197 self.assertRaises(re.error, re.compile, '(?P<>)')
198 self.assertRaises(re.error, re.compile, '(?P<1>)')
199 self.assertRaises(re.error, re.compile, '(?P<a.>)')
200 self.assertRaises(re.error, re.compile, '(?())')
201 self.assertRaises(re.error, re.compile, '(?(a))')
202 self.assertRaises(re.error, re.compile, '(?(1a))')
203 self.assertRaises(re.error, re.compile, '(?(a.))')
267 pat = re.compile('((a)|(b))(c)?')
281 pat = re.compile('(?:(?P<a1>a)|(?P<b2>b))(?P<c3>c)?')
304 p = re.compile('(?P<g1>a)(?P<g2>b)?((?(g2)c|d))')
444 r = re.compile('|'.join(('%d'%x for x in range(10000))))
492 re.compile(r'(a)a(?<=\1)c')
495 re.compile(r'(?P<g>a)a(?<=(?P=g))c')
498 re.compile(r'(a)b(?<=(?(1)b|x))c')
501 re.compile(r'(a)b(?<=(?(2)b|x))(c)')
687 oldpat = re.compile('a(?:b|(c|e){1,2}?|d)+?(.)')
702 self.assertTrue(re.compile('^pattern$', flag))
740 self.assertRaises(re.error, re.compile, 'foo[a-')
757 self.assertEqual(re.compile(pat) and 1, 1)
834 pat = re.compile(my_unicode("abc"))
844 self.assertIsNot(re.compile('bug_926075'),
845 re.compile(u'bug_926075'))
850 self.assertEqual(re.compile(pattern).split("a.b.c"),
858 scanner = re.compile(r"\s").scanner("a b")
898 self.assertIsNone(re.compile("bla").match(a))
899 self.assertEqual(re.compile("").match(a).groups(), ())
907 p = re.compile(upper_char, re.I | re.U)
911 p = re.compile(lower_char, re.I | re.U)
915 p = re.compile('(?i)' + upper_char, re.U)
919 p = re.compile('(?i)' + lower_char, re.U)
923 p = re.compile('(?iu)' + upper_char)
927 p = re.compile('(?iu)' + lower_char)
936 pattern = re.compile('$')
941 pattern = re.compile('$', re.MULTILINE)
955 self.assertRaises(OverflowError, _sre.compile, "abc", 0, [long_overflow])
959 pattern = re.compile('random pattern')
961 same_pattern = re.compile(pattern)
965 self.assertRaises(TypeError, re.compile, 0)
1003 self.assertRaises(OverflowError, re.compile, r".{%d}" % 2**128)
1004 self.assertRaises(OverflowError, re.compile, r".{,%d}" % 2**128)
1005 self.assertRaises(OverflowError, re.compile, r".{%d,}?" % 2**128)
1006 self.assertRaises(OverflowError, re.compile, r".{%d,%d}" % (2**129, 2**128))
1019 self.assertRaises(OverflowError, re.compile, r".{%d}" % MAXREPEAT)
1020 self.assertRaises(OverflowError, re.compile, r".{,%d}" % MAXREPEAT)
1021 self.assertRaises(OverflowError, re.compile, r".{%d,}?" % MAXREPEAT)
1026 re.compile('(?P=<foo>)')
1031 re.compile('(?P<?foo>)')
1037 self.assertEqual(re.compile(pattern, re.S).findall('xyz'),
1041 self.assertEqual(re.compile(pattern, re.S).findall(u'xyz'),
1049 r = re.compile("^((x|y)%s)%s" % (inner_op, outer_op))
1058 re.compile(pat, re.DEBUG)
1081 re.compile(pat, re.DEBUG)
1086 pat = re.compile(r'(ab)')
1158 obj = re.compile(pattern)
1224 obj=re.compile(unicode(pattern, "latin-1"))
1236 obj = re.compile(pattern)
1243 obj = re.compile(pattern, re.IGNORECASE)
1250 obj = re.compile(pattern, re.LOCALE)
1257 obj = re.compile(pattern, re.UNICODE)