Given a number it will match said number exept any trailing zeroes behind a decimal point or said decimal point if there would be no matched characters behind it. Some applications use trailing zeroes to denote precision. If your application wants to remove said trailing zeroes before displaying them this regex could be used.