s/./\u&\x09AlphaBravoCharlieDeltaEchoFoxtrotGolfHotelIndiaJulietKiloLimaMikeNovemberOscarPapaQuebecRomeoSierraTangoUniformVictorWhiskeyX-rayYankeeZulu /g s/\(\w\)\x09\S*\1\|[\x09A-Z]\S*/\1/g
Note that non-ascii characters in the above source code will be escaped (such as \x9f).