(self, string, pos=0, endpos=None)
| 116 | |
| 117 | @accepts_string |
| 118 | def finditer(self, string, pos=0, endpos=None): |
| 119 | haystack = string[:endpos].encode('utf8') |
| 120 | if self.submatches: |
| 121 | for captures in self._rure.captures_iter(haystack, pos): |
| 122 | yield MatchObject(pos, endpos, self, haystack, captures) |
| 123 | else: |
| 124 | for i, match in enumerate(self._rure.find_iter(haystack, pos)): |
| 125 | yield MatchObject(pos, endpos, self, haystack, i) |
| 126 | |
| 127 | @accepts_string |
| 128 | def sub(self, repl, string, count=0): |