What is the regular expression for a decimal with a precision of 2?
Valid examples:
123.12 2 56754 92929292929292.12 0.21 3.1
To include an optional minus sign and to disallow numbers like 015 (which can be mistaken for octal numbers) write:
015
-?(0|([1-9]\d*))(\.\d+)?