Running this code in JSFiddle results in a "no problem" for "l" but a "problem" for "m", even though both variables appear to be the same format. https://jsfiddle.net/zj8mg518/26/
var errString;
var l = "JLF5J-383Z3-QQKWR-JEN3T-39NUT-3";
var m = "12345-12345-12345-12345-A";
function Check_License_Key_Format(license) {
var regexLicense = new RegExp("^([A-za-z0-9]{5}[-]){5}[A-Za-z0-9]$");
return regexLicense.test(license);
}
if (Check_License_Key_Format(l) == false)
errString = "problem";
else
errString = "no problem";
alert(errString);
if (Check_License_Key_Format(m) == false)
errString = "problem";
else
errString = "no problem";
alert(errString);