Need a regular expression - disallow all zeros

后端 未结 7 1507
被撕碎了的回忆
被撕碎了的回忆 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:29

    This is Correct Answer Of this Regex

    [O]{1}((?!0+$)[0-9]{1,5})

    If you are work with specific Ids. so you must use that

    Ex. 1. O0 -- Reject 2. O00 -- Reject 3. O00000 -- Reject 4. O1 -- Success 5. O01 -- success

    0 讨论(0)
提交回复
热议问题