Convert hex to decimal by tails

s/$/=(p-)/
:1
s/w\(p*-\)/\1-w/
s/p-\{10\}/-p/
t1
s/(-/(p-/
s/:*\(.\)=(\([p-]*\)w*/=(wwww\2)\1(\2/
t1
s/[^)]*)//
:
s/[1-F]/&q/g
y/123456789ABCDEF/0123456789ABCDE/
s/\(0\(q*\)(\w*\)-/\1\2/
s/\([ p]\)q\{10\}/q\1/
t
s/0q*(p\?/p/g
s/\(.*\)q)/q\1)/
t
s/^/ /
s/p)/)/g
/p/b
s/).*//
s/ q*/&9876543210/g
s/ .\{9\}\(.\)\w*/\1/g

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page