I am trying to make a regex to get all the possible consecutive 4 digit numbers from a 10 digit number. Like
num = "2345678901";
Output :
2345
, 3456
, 4567
, 5678
, 6789
, 7890
, 8901
These simple regex are not working:
[d]{4}
(dddd)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…