Test, validate and match regular expressions
This regular expression matches formatted decimal numbers, optionally including thousands separators and scientific notation. It strictly prevents leading zeros in the main number and exponent, while ensuring the fractional part does not end with a zero (unless it is exactly .0). It is ideal for sanitizing and validating precise numeric inputs.