Stack overflow in the daytime.
I am using regex in noob, and here is my problem. I need to check the password if it contains 4 consecutive characters. So far, what I just looked at is about numbers. Here is my regex:
increasing numbers - ^.? (?: 0123 | 1234 | 2345 | 3456 | 4567 | 5678 | 6789). $
descending numbers - ^.? (?: 9876 | 8765 | 7654 | 6543 | 5432 | 4321 | 3210). $
This only works for numbers. I know that this is already an excess in regular expression, so I do not want to do this with letters. If I do this, it will be too hard.
abcdblah // true due to abcd
helobcde // true due to bcde
dcbablah // true beacause of dcba
heloedcb // true due to edcb
Any help would be greatly appreciated. Thanks stackoverflow.
source share