Returns true if and only if the regex 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)
| 119 | |
| 120 | @accepts_bytes |
| 121 | def is_match(self, haystack, start=0): |
| 122 | """ Returns true if and only if the regex matches the string given. |
| 123 | |
| 124 | It is recommended to use this method if all you need to do is test |
| 125 | a match, since the underlying matching engine may be able to do less |
| 126 | work. |
| 127 | """ |
| 128 | return bool(_native.lib.rure_is_match( |
| 129 | self._ptr, |
| 130 | haystack, |
| 131 | len(haystack), |
| 132 | start |
| 133 | )) |
| 134 | |
| 135 | @accepts_bytes |
| 136 | def find(self, haystack, start=0): |
no outgoing calls