in reply to global match except last one
s/([a-z]+)(?=(.?))/ uc($1) . (length($2) ? "_" : "") /ge; [download]