]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
#6679: Remove mention that sub supports no flags.
authorGeorg Brandl <georg@python.org>
Thu, 13 Aug 2009 07:48:05 +0000 (07:48 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 13 Aug 2009 07:48:05 +0000 (07:48 +0000)
Doc/library/re.rst

index df63f9bec2809d7ffd2d703fa197a6102ef2f6c0..c099fcd59d667936b2e97a13809db53a3b900eb6 100644 (file)
@@ -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