Pattern regex = Pattern.compile("^\\d{0,8}\\.\\d{0,4}$");
is working, but if I enter value e.g 5000, it should work. Basically valid value should be equal or less than "99999999.9999".
If value is "123456789" it is invalid.
Decimal point is not mandatory.
Please help.