java正则去掉小数点后多余0

http://blog.sina.com.cn/s/blog_4adc4b090101i93n.html
需求:已知字符串为一数字字符形式,多为float,double转换过来,将其后多余的0与.去掉.