I am trying to get my regexp working but I am not having much luck.
I would like to check whether the input string is 6 numbers and 1 character (123123A), no spaces, no dashes. My regex doesn't match even though I think I am entering a valid string.
Could anyone please point me where my issue is?
var userString = "123123A";
if( /^d{6}[a-zA-Z]{1}$/.test(userString) ){
alert("Correct format");
}
else{
alert("Incorrect format");
}