[issue12078] re.sub() replaces only several matches

2011-05-14 Thread Andriy Rysin
Andriy Rysin added the comment: Ahh, I guess I should have read the docs. But then looks like I am not the fist or only one so it's not as embarrassing. :) I would support the proposal in #11957 to make re flags non-int object -- ___ Python tracker

[issue12078] re.sub() replaces only several matches

2011-05-14 Thread Ezio Melotti
Ezio Melotti added the comment: See #11957. -- nosy: +ezio.melotti resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> re.sub confusion between count and flags args ___ Python tracker

[issue12078] re.sub() replaces only several matches

2011-05-14 Thread Matthew Barnett
Matthew Barnett added the comment: Argument 4 of re.sub is the maximum number of replacements, NOT flags: Help on function sub in module re: sub(pattern, repl, string, count=0, flags=0) Return the string obtained by replacing the leftmost non-overlapping occurrences of the pattern in s

[issue12078] re.sub() replaces only several matches

2011-05-14 Thread Andriy Rysin
New submission from Andriy Rysin : When trying to replace strings with parenthesis (in the given example - alternative writing of the words in Ukrainian) the sed replace performs correctly replacing all occurrences, while python3 re.sub() function replaces only first two -- _

[issue12078] re.sub() replaces only several matches

2011-05-14 Thread Andriy Rysin
Changes by Andriy Rysin : Added file: http://bugs.python.org/file22001/test.txt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue12078] re.sub() replaces only several matches

2011-05-14 Thread Andriy Rysin
Changes by Andriy Rysin : Added file: http://bugs.python.org/file22000/repl.py ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue12078] re.sub() replaces only several matches

2011-05-14 Thread Andriy Rysin
Changes by Andriy Rysin : -- components: Regular Expressions files: repl.sh nosy: arysin priority: normal severity: normal status: open title: re.sub() replaces only several matches versions: Python 3.1 Added file: http://bugs.python.org/file21999/repl.sh ___