it reads as easy as Perl code the above, yet ok, visually reviewed to conform with re.sub style seen elsewhere :-P