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
adding my answer too, someone might find it useful or may be correct mine too.
function getInteger(int){ var regx = /^[-+]?[\d.]+$/g; return regx.test(int); } alert(getInteger('-11.11'));