[issue27851] re.sub() bug with IGNORECASE

2016-08-24 Thread Dan Wilt
Dan Wilt added the comment: Thanks! That helps. I apologize for raising a non-existent issue. Dan On Wed, Aug 24, 2016 at 11:59 AM, R. David Murray wrote: > > R. David Murray added the comment: > > I really wish we could "fix" this somehow, since we get an issue opened > for it probably every

[issue27851] re.sub() bug with IGNORECASE

2016-08-24 Thread R. David Murray
R. David Murray added the comment: I really wish we could "fix" this somehow, since we get an issue opened for it probably every two or three months. The fourth argument to re.sub is the count, not the flags. -- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status

[issue27851] re.sub() bug with IGNORECASE

2016-08-24 Thread Dan Wilt
New submission from Dan Wilt: Working with re.sub() noted strange behavior with re.I set, seems like a bug. Noted in both Python 2.7.12 and Python 3.5.2, Anaconda custom build (32-bit) on Windows 7. >>> import re >>> re.sub('\.', '', '.') '' >>> re.sub('\.', '', '.', re.I) '...' >>> re