Need a regular expression - disallow all zeros

后端 未结 7 1577
被撕碎了的回忆
被撕碎了的回忆 2020-11-28 14:41

I want to validate a string to meet the following conditions:

  • Must be 6 characters long
  • Only the first character can be alpha-numeric the rest must be
7条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-28 15:26

    I would do two passes. One with your first regex, and one with a new regex looking for all zeros.

提交回复
热议问题