Commit 04fd324f authored by Georg Brandl's avatar Georg Brandl

#6679: Remove mention that sub supports no flags.

parent f466642c
...@@ -635,9 +635,7 @@ form. ...@@ -635,9 +635,7 @@ form.
>>> re.sub(r'\sAND\s', ' & ', 'Baked Beans And Spam', flags=re.IGNORECASE) >>> re.sub(r'\sAND\s', ' & ', 'Baked Beans And Spam', flags=re.IGNORECASE)
'Baked Beans & Spam' 'Baked Beans & Spam'
The pattern may be a string or an RE object; if you need to specify regular The pattern may be a string or an RE object.
expression flags, you must use a RE object, or use embedded modifiers in a
pattern; for example, ``sub("(?i)b+", "x", "bbbb BBBB")`` returns ``'x x'``.
The optional argument *count* is the maximum number of pattern occurrences to be The optional argument *count* is the maximum number of pattern occurrences to be
replaced; *count* must be a non-negative integer. If omitted or zero, all replaced; *count* must be a non-negative integer. If omitted or zero, all
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment