Currently I write the regex like this: /^([d+]*-)+([d]*-)+([d])*$/
I want the result follow this pattern 00-123-456-789
or 00123456789
(dash between number group or no dash at all)
- not
00-123--457-789
- or
-00-123-456-789-
- or
-00123456789-
- or
00-123-456-789-
How can I modify the regex to matches the pattern above?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…