什么是html模式属性中KA-05-AA-0000的模式匹配表达式?

时间:2017-12-09 04:48:05

标签: html pattern-matching

模式匹配KA-05-AA-0000的正则表达式是什么?

1 个答案:

答案 0 :(得分:1)

/ [AZ] [AZ] - [0-9] [0-9] - [AZ] [AZ] - [0-9] [0-9] [0-9] [0-9] /克

[A-Z] Match a single character present in the range between A (index 65) and Z (index 90) case sensitive)
- matches the character - literally (case sensitive)
[0-9] Match a single character present in the range between 0 (index 48) and 9 (index 57) (case sensitive)
g modifier: global. All matches (don't return after first match)