> re.sub("\$([^$]+)\$","%(\g<1>)s",s) Ah, now I remember why I ditched Perl!! ;-) Anyway, thanks for your help! I now got several options to go with and they all seem to work just fine. Thanks!!! Thomas