I'd say it has something to do with that backspace you're inserting into the string in the first substitution of your map. Don't do that :-)
you can see that the missing 7 is really still there by piping the output of your program through some utility like xxd to get a raw dump.
In reply to Re: disappearing digit with regex and tr
by duff
in thread disappearing digit with regex and tr
by zentara
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |