var valid_plate;

valid_plate = function(plate) {
	var regex, v;
	v = plate.replace(/\s+/g, '').toUpperCase();
	regex = /^(0[1-9]|[1-7][0-9]|8[01])(([A-Z])(\d{4,5})|([A-Z]{2})(\d{3,4})|([A-Z]{3})(\d{2}))$/;
	return v.match(regex) != null;
};