[issue34048] Bad behavior of re.IGNORECASE

2018-07-04 Thread Jan Švec
Jan Švec added the comment: Not a bug, it assigns the value of re.IGNORECASE into the count parameter. Sorry -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue34048] Bad behavior of re.IGNORECASE

2018-07-04 Thread Jan Švec
New submission from Jan Švec : re.sub() is behaving incorrectly, if re.IGNORECASE is used. Tested on 2.7, 3.4 and 3.6. The code follows: import re def subst(text): text = re.sub(r"\bnine\b", "niner", text, re.IGNORECASE) return text print(subst("nine nine nine