Proposal for exact matching and matching at a position in RegExp

Andy Chu andy at
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, 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:\.search\(.*%3F%2C[^)]*%2C+lang%3Apy&hl=en

if, i+4, res.start(0)):
   self.syntax_error("`--' inside comment")

double dash is the regex '--'.


More information about the es-discuss mailing list