Skip to content Skip to sidebar Skip to footer

Portuguese Vehicle Plate Structural Verification

I want to validate if a plate of a Portuguese car has a valid structure. Portuguese Plate is XX-XX-XX alpha numeric. It's Alpha numeric but you can´t have a number and a Char on t

Solution 1:

Try

let re = /^([A-Z]{2}|\d\d)-([A-Z]{2}|\d\d)-([A-Z]{2}|\d\d)$/;

console.log( re.test('A5-99-AB') );
console.log( re.test('55-99-AB') );

Post a Comment for "Portuguese Vehicle Plate Structural Verification"