[A
This question already has an answer here:
Because
[A-z0-9]+
↑ ↑
is from A to z , see the ASCII table, ] appears between the two characters:

A===>64
z===>122
[===>91
所以它在你定义的范围之间。使用[A-Za-z0-9]+
您可以使用/[a-z0-9]+/i ( i使其不区分大小写)或/[A-Za-z0-9]+/ 。
上一篇: IP地址验证的正则表达式
下一篇: [一个
