import re re.sub(r'Perl[^A-Za-z]*', 'Python ', 'Perl6::Rules')