On Sun, 15 Aug 2010 17:36:07 -0700, Alex Willmer wrote:
On Aug 16, 1:07 am, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
You're passing re.IGNORECASE (which happens to equal 2) as a count
argument, not as a flag. Try this instead:
re.sub(rpython\d\d + '(?i)', Python27, t)
On Aug 15, 8:07 pm, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Sun, 15 Aug 2010 16:45:49 -0700, Christopher wrote:
I have the following problem:
t=Python26
import re
re.sub(rpython\d\d, Python27, t)
'Python26'
re.sub(rpython\d\d, Python27, t, re.IGNORECASE)
On Aug 16, 12:23 pm, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Sun, 15 Aug 2010 17:36:07 -0700, Alex Willmer wrote:
On Aug 16, 1:07 am, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
You're passing re.IGNORECASE (which happens to equal 2) as a count
On Aug 16, 1:46 pm, Alex Willmer a...@moreati.org.uk wrote:
Note that the (?x) flag changes how the expression is parsed. It
should be used first in the expression string, or after one or more
whitespace characters. If there are non-whitespace characters before
the flag, the results are
On Mon, 16 Aug 2010 05:46:17 -0700, Alex Willmer wrote:
On Aug 16, 12:23 pm, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Sun, 15 Aug 2010 17:36:07 -0700, Alex Willmer wrote:
On Aug 16, 1:07 am, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
You're
I have the following problem:
Python 2.7 (r27:82525, Jul 4 2010, 07:43:08) [MSC v.1500 64 bit
(AMD64)] on win32
Type help, copyright, credits or license for more information.
t=Python26
import re
re.sub(rpython\d\d, Python27, t)
'Python26'
re.sub(rpython\d\d, Python27, t, re.IGNORECASE)
On Sun, 15 Aug 2010 16:45:49 -0700, Christopher wrote:
I have the following problem:
t=Python26
import re
re.sub(rpython\d\d, Python27, t)
'Python26'
re.sub(rpython\d\d, Python27, t, re.IGNORECASE)
'Python26'
re.sub(rPython\d\d, Python27, t, re.IGNORECASE)
'Python27'
Is this a known
On Aug 16, 1:07 am, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
You're passing re.IGNORECASE (which happens to equal 2) as a count
argument, not as a flag. Try this instead:
re.sub(rpython\d\d + '(?i)', Python27, t)
'Python27'
Basically right, but in-line flags must be
Alex Willmer wrote:
On Aug 16, 1:07 am, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
You're passing re.IGNORECASE (which happens to equal 2) as a count
argument, not as a flag. Try this instead:
re.sub(rpython\d\d + '(?i)', Python27, t)
'Python27'
Basically right, but