From b0b9ba901ac16379fa73ac1c773df45456a47767 Mon Sep 17 00:00:00 2001 From: "georg.brandl" Date: Thu, 13 Aug 2009 07:48:05 +0000 Subject: [PATCH] #6679: Remove mention that sub supports no flags. git-svn-id: http://svn.python.org/projects/python/trunk@74365 6015fed2-1504-0410-9fe1-9d1591cc4771 --- Doc/library/re.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Doc/library/re.rst b/Doc/library/re.rst index df63f9bec2..c099fcd59d 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -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 -- 2.11.4.GIT