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.