Need help to stop user from entering phone number with three or more repeated digits except 999.
Phone number could be 10 digit to 25 digit.
Bad Input:
- 8777267331
- 000
- 66667878763
Exception:
- 767886655999
I tried --> \b(\d)\3 \b
but looks that is not right.
CodePudding user response:
Have a try with
^(?:([0-8])(?!\1\1)|9){10,25}$