Remove redundant zeros from a decimal string with TypeScript regular expressions, drop a trailing decimal point, and preserve the original value without Number conversion.
The function trims surrounding whitespace, removes zeros only from the fractional portion, and also removes the decimal point if no fractional digits remain. Unlike converting through Number, this preserves the input as a string and avoids changing large values through floating-point parsing.