Lines Matching refs:flags
47 (?aiLmsux) The letters set the corresponding flags defined below.
100 Each function other than purge and escape can take an optional 'flags' argument
163 def match(pattern, string, flags=0):
166 return _compile(pattern, flags).match(string)
168 def fullmatch(pattern, string, flags=0):
171 return _compile(pattern, flags).fullmatch(string)
173 def search(pattern, string, flags=0):
176 return _compile(pattern, flags).search(string)
178 def sub(pattern, repl, string, count=0, flags=0):
185 return _compile(pattern, flags).sub(repl, string, count)
187 def subn(pattern, repl, string, count=0, flags=0):
196 return _compile(pattern, flags).subn(repl, string, count)
198 def split(pattern, string, maxsplit=0, flags=0):
206 return _compile(pattern, flags).split(string, maxsplit)
208 def findall(pattern, string, flags=0):
216 return _compile(pattern, flags).findall(string)
218 def finditer(pattern, string, flags=0):
223 return _compile(pattern, flags).finditer(string)
225 def compile(pattern, flags=0):
227 return _compile(pattern, flags)
234 def template(pattern, flags=0):
244 return _compile(pattern, flags|T)
272 def _compile(pattern, flags):
274 if isinstance(flags, RegexFlag):
275 flags = flags.value
277 return _cache[type(pattern), pattern, flags]
281 if flags:
283 "cannot process flags argument with a compiled pattern")
287 if flags & T:
294 p = _compiler.compile(pattern, flags)
295 if not (flags & DEBUG):
302 _cache[type(pattern), pattern, flags] = p
330 return _compile, (p.pattern, p.flags)
338 def __init__(self, lexicon, flags=0):
340 if isinstance(flags, RegexFlag):
341 flags = flags.value
346 s.flags = flags
350 (SUBPATTERN, (gid, 0, 0, _parser.parse(phrase, flags))),