Searches the string for the pattern, caching the compiled regexp.
(pattern, s)
| 417 | |
| 418 | |
| 419 | def Search(pattern, s): |
| 420 | """Searches the string for the pattern, caching the compiled regexp.""" |
| 421 | if not pattern in _regexp_compile_cache: |
| 422 | _regexp_compile_cache[pattern] = sre_compile.compile(pattern) |
| 423 | return _regexp_compile_cache[pattern].search(s) |
| 424 | |
| 425 | |
| 426 | class _IncludeState(dict): |
no outgoing calls
no test coverage detected