Message315813
The documentation states that match.end([group]) returns "the ind[ex] of the... end of the substring matched by group". In fact, it returns [said index] + 1, as demonstrated by the example below:
s = 'example'
sre = re.search('le', s)
s[sre.end()]
Incidentally, I don't see the logic of this behaviour, but in any case it should be correctly documented. |
|
Date |
User |
Action |
Args |
2018-04-26 19:08:57 | C. Y. Hollander | set | recipients:
+ C. Y. Hollander, docs@python |
2018-04-26 19:08:57 | C. Y. Hollander | set | messageid: <1524769737.79.0.682650639539.issue33368@psf.upfronthosting.co.za> |
2018-04-26 19:08:57 | C. Y. Hollander | link | issue33368 messages |
2018-04-26 19:08:57 | C. Y. Hollander | create | |
|