Message30468
Logged In: YES
user_id=7887
Hello Thomas,
I don't understand exactly what you mean here.
This doesn't work:
>>> re.compile("([0-9])([a-z])?").subn(r"<\1\2>", "1 1a")
Traceback (most recent call last):
...
sre_constants.error: unmatched group
And this works fine:
>>> re.compile("([0-9])([a-z]?)").subn(r"<\1\2>", "1 1a")
('<1> <1a>', 2)
The example code you provided doesn't run here, because
'subn()' is being provided
bad data (check http://docs.python.org/lib/node46.html for
docs). It's also
being passed '\1\2', which is really '\x01\x02', and won't
do what you want.
|
|
Date |
User |
Action |
Args |
2007-08-23 14:49:31 | admin | link | issue1591319 messages |
2007-08-23 14:49:31 | admin | create | |
|