I have tried the following regular expression for my validation but it is resulting in false and im not able to get the solution. I want it to validate for Max 15 digits excluding 4 decimal places. Can anybody guide me through this?
var patt = new RegExp("[-+]?\d{1,15}(\.\d{1,4})?$");
var res = patt.test(txtFxRateAgainstUSD.value);
if (!res)
{
errMsg = errMsg + "Enter Rate in valid format: (Max 15 digits excluding 4 decimal places).\r\n";
}