(self, string, pos=0, endpos=None)
| 74 | |
| 75 | @accepts_string |
| 76 | def search(self, string, pos=0, endpos=None): |
| 77 | haystack = string[:endpos].encode('utf8') |
| 78 | if self.submatches: |
| 79 | captures = self._rure.captures(haystack, pos) |
| 80 | if captures: |
| 81 | return MatchObject(pos, endpos, self, haystack, captures) |
| 82 | else: |
| 83 | match = self._rure.find(haystack, pos) |
| 84 | if match: |
| 85 | return MatchObject(pos, endpos, self, haystack, 0) |
| 86 | |
| 87 | @accepts_string |
| 88 | def match(self, string, pos=0, endpos=None): |