i am trying to create a regular expression that says the following:

allow any number for the first 6 digits. after that, do not allow any character besides a '.' and after that, allow 2 digits of any number. so, in other words, i want to allow a maximum of 6 digits followed by a maximum of 2 decimal places. my current regular expression doesn't work, but it goes as follows:

"[0-9]{0," + MAX_INTEGER_PRECISION + "}[\\.]{0,1}[0-9]{0," + MAX_DECIMAL_PRECISION + "}"

any idea where i went wrong here?