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