Hi, I am using following code to check first four characters are alphabate or not.
var pattern = new RegExp('^[A-Z]{4}');
if (enteredID.match(pattern))
isValidAlphabates = true;
else {
isValidAlphabates = false;
This is working fine; Now I need to check the next 6 characters (of the entered text) need to be only numeric (0 to 9).
I ve the option to use substring or substr method to extract that part & use the regular experssion: ^[0-9]{6}.
But is there a better way to do it, without using the substring method here.