add option for keeping trailing zeros - fixes #27 started in #12
smarter regexp for trailing zeros and simplified method for tables #27 #12