s/./ _________0&/g : s/[1-9]/&_/g y/123456789/_12345678/ t :0 h s/ \(_*\)0__\(\1_*\)\b/ ||\2/g s/ \(_*\)_*0\1\b/s\1/g :1 s/_*0// s/\(|\|s\)_/ \1/ t1 y/s/ / p g s/_0/0/g t0 Q
Note that non-ascii characters in the above source code will be escaped (such as \x9f).