Python 正则表达式验证Canadian邮政编码

来源:互联网 发布:java邮件设置传输协议 编辑:程序博客网 时间:2024/06/09 19:39

Canadian Postal Code Rule

1. Format CNC CNCC is the character between A and Z.N is the number between 0 and 9.2. RuleC should not be DFIOQU.The first C should also not be WZ.

Regular Expression

^(?!.*[DFIOQU])[A-VXY][0-9][A-Z] [0-9][A-Z][0-9]$



0 0
原创粉丝点击