if(stringa.match(/^[a-zA-Z]\d\d[a-zA-Z]\d*/) ) {
alert("la stringa e` a posto");
} else {
alert("la tua stringa non mi piace");
}