The regex ^(?!.*(d)1{5})[6-9]d{9}$ will not allow more than 5 consecutive same digits. but how to change regex to allow 6 consecutive digits in middle but not at start and end of string.
The regex should accept 6 consecutive same digits in middle of string like from 9888888654 and should not accept at the start of string like 9999994567 and at end of string like 9873555555
Please help.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…