re.sub do not replace portion of match

J Wolfe vorticitywolfe at
Fri Oct 2 18:20:20 CEST 2009

Thanks Duncan,

I did look at that, but it was kinda greek to me.  Thanks for pulling
out the part I was looking for that should do the trick.


> > Backreferences, such as \6, are replaced with the substring matched by
> > group 6 in the pattern.

More information about the Python-list mailing list