s/-//g : s/\(\S\)\(.* \)*\(\S*\1\S*\)/\3\2/ t s/\S\+/\x0b\x0c&\x09/g h :1 s/\S*\x0c\x09\|\x0c\(\S\)/\1\x0c/g H t1 g s/\s*$/!ABCDEFGHIJKLMNOPQRSTUVWXYZ/ s/\x0c\x09.*\x0b/ / s#!.*#\n./0123456789:;<=>?@&[\\]^_`\L&{|}~# :2 s/.*\x0b\|\(.\)\(.\)\(.*\2.*\1\)/\2\1\3/ t2 P d
Note that non-ascii characters in the above source code will be escaped (such as \x9f).