Searches the string for the pattern, caching the compiled regexp.
(pattern, s)
| 1055 | |
| 1056 | |
| 1057 | def Search(pattern, s): |
| 1058 | """Searches the string for the pattern, caching the compiled regexp.""" |
| 1059 | if pattern not in _regexp_compile_cache: |
| 1060 | _regexp_compile_cache[pattern] = sre_compile.compile(pattern) |
| 1061 | return _regexp_compile_cache[pattern].search(s) |
| 1062 | |
| 1063 | |
| 1064 | def _IsSourceExtension(s): |
no test coverage detected