search

Home  >  Q&A  >  body text

javascript - js regular verification: up to 12 characters, only Chinese, English upper and lower case, numbers, basic symbols

js regular verification: up to 12 characters, only Chinese, English upper and lower case, numbers, basic symbols;
How to verify abnormal symbols

女神的闺蜜爱上我女神的闺蜜爱上我2728 days ago1012

reply all(1)I'll reply

  • 代言

    代言2017-07-05 10:45:12

    Assume the basic symbols are -, _ (add according to specific circumstances)

    /^[A-Za-z\d_\-\u4e00-\u9fa5]{1,12}$/.test('segmentfault')

    reply
    0
  • Cancelreply