Home > Back-end >  Character length check
Character length check

Time:03-24

Bosses, I now want to regular check of the license plate, request string contains Chinese characters, Numbers and the capital letters, length must only seven, now my regular expression is written like this: [/^ [A - Z0-9 \ u4e00 - \ u9fa5] {7} $/], but I'm in the input A length of 7 character input length of seven or will prompt, trouble to help me see what's the problem?

CodePudding user response:

^ [beijing-tianjin Shanghai yu ji yu cloud liao black xiang anhui new GuiGan of hubei province can Sue your yue jin meng shan ji min qinghai-tibet plain NingQiong that brought A - Z] {1} {1} [a-z] [A - Z0-9] {4} [A - Z0-9 hang cop Hong Kong and Macao] {1} $

CodePudding user response:

Test or not

CodePudding user response:

Length (7-8) not only to check, and fixed character checking, as if the else to reality
  • Related