mirror of
https://github.com/python/cpython.git
synced 2026-02-05 09:25:35 +00:00
#6679: Remove mention that sub supports no flags.
This commit is contained in:
parent
f466642c66
commit
04fd324fe3
1 changed files with 1 additions and 3 deletions
|
|
@ -635,9 +635,7 @@ form.
|
|||
>>> re.sub(r'\sAND\s', ' & ', 'Baked Beans And Spam', flags=re.IGNORECASE)
|
||||
'Baked Beans & Spam'
|
||||
|
||||
The pattern may be a string or an RE object; if you need to specify regular
|
||||
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 pattern may be a string or an RE object.
|
||||
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue