## [GNU sed][1], <s>17</s> 14 + 1(r flag) = 15 bytes

**Edit:** 2 bytes less thanks to [Riley](/users/57100/riley)

<!-- language: lang-sed -->


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!**](https://tio.run/nexus/bash#K05NUdAtUlD/X2ylp6URHWcQq2kVY2j1X/2/IZcRl6EBlyGQtuQyNuCytARyQXwgbWTAZQRkmxiAxIwMAA) (all test examples)

  [1]: https://en.wikipedia.org/wiki/Sed