4 of 4 minor formatting changes

GNU sed, 17 14 + 1(r flag) = 15 bytes

Edit: 2 bytes less thanks to Riley


It works by deleting everything until the right-most nonzero digit, which is then printed along with any existing trailing zeros. The script can handle multiple tests in one run, each on a separate line.

Try it online! (all test examples)