I am trying to build a regex which will allow both negative and positive decimal numbers with the following rules.
My own regex:
var rgx = /^(-{1}?(?:([0-9]{0,10}))|([0-9]{1})?(?:([0-9]{0,9})))?(?:\.([0-9]{0,3}))?$/;