车牌号正则

 isVehicleNumber(vehicleNumber) {
    var result = false
    if (vehicleNumber.length == 8) {
      
      var express = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
      result = express.test(vehicleNumber)
    }
    return result
  }

汉字(2)字母数字6位组合正则

var express = /^[\u4e00-\u9fa5]{2}[A-Z0-9]{6}$/

posted @ 2021-07-23 12:20  shuihanxiao  阅读(340)  评论(0编辑  收藏  举报