s/./&&!/g s/.![A-O]/\x04/g s/.![P-Z]/\x05/g s/![ -.]/<\x02\x12"2brBR\xc2\xd2\xe2\xf2\x92\x82\xb2>/g s/![a-o]/<\x06\x16\&6fvFV\xc6\xd6\xe6\xf6\x96\x86\xb6>/g s/!./<\x07\x17'7gwGW\xc7\xd7\xe7\xf7\x97\x87\xb7>/g s/\([h-oy,-.]<\).\{8\}/\1/gi s/\([d-kt-y]<\)..../\1/gi s/\([b-eknor-u.]<\)../\1/gi s/\([aceghmosuw-]<\)./\1/gi s/.<\(.\)[^>]*>/\1/g s/./\xf4/ s/.!/\xef/
Note that non-ascii characters in the above source code will be escaped (such as \x9f).