Proposal for exact matching and matching at a position in RegExp
Andy Chu
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:
http://www.google.com/codesearch?q=\.search\(.*%3F%2C[^)]*%2C+lang%3Apy&hl=en
if doubledash.search(rawdata, i+4, res.start(0)):
self.syntax_error("`--' inside comment")
double dash is the regex '--'.
Andy
More information about the es-discuss
mailing list