[issue25517] regex howto example in "Lookahead Assertions"

2016-01-11 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the patch! -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___ ___

[issue25517] regex howto example in "Lookahead Assertions"

2016-01-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset c6b5c03183e3 by Ezio Melotti in branch '2.7': #25517: fix regex in the regex howto. Patch by Elena Oat. https://hg.python.org/cpython/rev/c6b5c03183e3 New changeset 6bd4a4907f66 by Ezio Melotti in branch '3.5': #25517: fix regex in the regex howto.

[issue25517] regex howto example in "Lookahead Assertions"

2016-01-10 Thread Elena Oat
Elena Oat added the comment: Corrected the regular expression and documented why [^.]* is used. -- keywords: +patch nosy: +Elena.Oat Added file: http://bugs.python.org/file41566/issue25517.diff ___ Python tracker _

[issue25517] regex howto example in "Lookahead Assertions"

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett versions: -Python 3.4 ___ Python tracker ___ __

[issue25517] regex howto example in "Lookahead Assertions"

2015-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Note that lookbehind assertions still are not documented in Regular Expression HOWTO. The example that demonstrates negative lookahead assertion is ".*[.](?!bat$)[^.]*$". But then we should explain why ".*" is changed to "[^.]*". -- nosy: +akuchlin

[issue25517] regex howto example in "Lookahead Assertions"

2015-10-30 Thread Pavel
New submission from Pavel: The example advises ".*[.](?!bat$).*$" expression "to match filenames where the extension is not bat". But here is an example which passes such check: >>> re.match("(.*)[.](?!bat$).*$", "test.a.bat") <_sre.SRE_Match object at 0x7ff221996f30> To my mind use of negativ