On Jun 12, 8:57 pm, David C. Ullrich <[EMAIL PROTECTED]> wrote: > True or False? (no fair looking it up) > > (*) If repl is a string then re.sub(pattern, repl, s) > returns s with non-overlapping occurences of pattern > replaced by repl. > > I assumed it was true - spent a few hours trying to > figure out what was going on with a certain re.sub, > then noticed that (*) is false: >
Well, the docs do say "Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl." -- care to tell us what "a certain re.sub" is, and false in what way? -- http://mail.python.org/mailman/listinfo/python-list