You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Activity
DanWilt commentedon Aug 24, 2016
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.
The first case is the expected behavior, the second and third aren't. Oddly enough,
MWE file attached (python3)
Thanks, I'm a heavy python user, but not all that advanced - hope this is helpful and I'm not just being stupid.
bitdancer commentedon Aug 24, 2016
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.
DanWilt commentedon Aug 24, 2016
Thanks! That helps. I apologize for raising a non-existent issue.
Dan
On Wed, Aug 24, 2016 at 11:59 AM, R. David Murray <report@bugs.python.org>
wrote: