领事馆车牌正则表达式
时间: 2023-12-20 13:32:47 浏览: 182
常用正则校验表达式(车牌,身份校验。。。高精度校验)
以下是领事馆车牌的正则表达式示例:
1. 大使馆车牌正则表达式:
```python
import re
pattern = r"\d{3}\d{3}使"
plate_number = "123456使"
match = re.match(pattern, plate_number)
if match:
print("匹配成功")
else:
print("匹配失败")
```
2. 领事馆车牌正则表达式:
```python
import re
pattern = r"(沪A|粤A|川A|云A|桂A|鄂A|闽D|鲁B|陕A|蒙[AEH]|藏A|黑A|辽A|渝A)\d{2}\d{4}领"
plate_number = "沪A12345领"
match = re.match(pattern, plate_number)
if match:
print("匹配成功")
else:
print("匹配失败")
```
阅读全文