Well typed, string transmutation via splicing, driven by definitions of regular expressions, priority match and recursive clauses