re.sub do not replace portion of match

J Wolfe vorticitywolfe at gmail.com
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.

Jonathan

> http://www.python.org/doc/current/library/re.html#re.sub
>
> > Backreferences, such as \6, are replaced with the substring matched by
> > group 6 in the pattern.





More information about the Python-list mailing list