Returns true if and only if one of the regexs matches the string given. It is recommended to use this method if all you need to do is test a match, since the underlying matching engine may be able to do less work.
(self, haystack, start=0)
| 291 | |
| 292 | @accepts_bytes |
| 293 | def is_match(self, haystack, start=0): |
| 294 | """ |
| 295 | Returns true if and only if one of the regexs matches the string |
| 296 | given. |
| 297 | |
| 298 | It is recommended to use this method if all you need to do is test |
| 299 | a match, since the underlying matching engine may be able to do less |
| 300 | work. |
| 301 | """ |
| 302 | return bool(_native.lib.rure_set_is_match( |
| 303 | self._ptr, |
| 304 | haystack, |
| 305 | len(haystack), |
| 306 | start |
| 307 | )) |
| 308 | |
| 309 | @accepts_bytes |
| 310 | def matches(self, haystack, start=0): |
no outgoing calls