Build, test, and debug regular expressions
Matches a decimal point followed by exactly two digits, then optionally captures a third digit only if it is non-zero ([1-9]), consuming any remaining digits outside the capture group. Used with a replace operation referencing $1, it truncates decimals to 2 or 3 places—keeping the third decimal only when it's significant. For example, '.1234' becomes '.123' while '.1200' becomes '.12'. Ideal for number formatting and trailing-zero trimming without rounding.