I notice some strange behavior in the Python Regex library, and I'm not sure if something is wrong.
If I run regex using re.sub() , with re.MULTILINE . It seems to only replace the first few cases. It replaces all occurrences if I disable re.MULTILINE , use re.subn(..., count = 0, flags = re.MULTILINE) or compile the regex with re.compile(..., re.MULTILINE) .
I am running Python 2.7 on Ubuntu 12.04.
I sent a random example:
- Pastebin.com - terminal output
- codepad - Script confirming the behavior (with the exception of re.subn (), which is different from 2.5)
Can someone confirm or deny this behavior on their machine?
EDIT: Implemented, I have to continue and publish it in Python. EDIT 2: Error Message: http://bugs.python.org/msg168909
source share