index for regex.search() beyond which the RE engine will not go.

Steve D'Aprano steve+python at pearwood.info
Fri Aug 19 10:10:18 EDT 2016


On Fri, 19 Aug 2016 09:21 pm, Jon Ribbens wrote:

> On 2016-08-19, iMath <redstone-cold at 163.com> wrote:
>> for
>> regex.search(string[, pos[, endpos]])
>> The optional parameter endpos is the index into the string beyond
>> which the RE engine will not go, while this lead me to believe the
>> RE engine will still search on till the endpos position even after
>> it returned the matched object, is this Right ?
> 
> I am not able rightly to apprehend the kind of confusion of ideas
> that could provoke such a question.


Consider that iMath's native language may not be English, and that he or she
may not understand how regular expression matching works.




-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.




More information about the Python-list mailing list