Proposal for exact matching and matching at a position in RegExp
andy at chubot.org
Fri Feb 12 09:33:59 PST 2010
> One thing I didn't bring up is that Python actually has an "endpos"
> argument. You do regex.search(s, 10, 20), and it will stop at
> position 20. I couldn't think of a real use case for this. But
> anyone can think of one, that might be a consideration and sway things
> in favor of separate methods.
Found some real usage of endpos:
if doubledash.search(rawdata, i+4, res.start(0)):
self.syntax_error("`--' inside comment")
double dash is the regex '--'.
More information about the es-discuss