re.sub and empty groups
Patrick Gaherty
pgaherty at chambersharrap.co.uk
Tue Feb 12 10:56:02 EST 2002
More information about the Python-list mailing list
Tue Feb 12 10:56:02 EST 2002
- Previous message (by thread): re.sub and empty groups
- Next message (by thread): proxy authentication: how to hide password
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'm trying something along the following lines: line = re.sub(r'(a)(b)?(c)',r'\3\2\1',line) and Python complains about empty groups when (b)? doesn't match. What's the best way of getting around this? Thanks in advance. Patrick Gaherty
- Previous message (by thread): re.sub and empty groups
- Next message (by thread): proxy authentication: how to hide password
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list