Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi...

I'm looking for a regular expression to check a String contains repeated sequence like 1234, abcd, def, etc. to validate password... Thanks in advance.
Posted
Comments
shakil0304003 14-Jun-11 6:49am    
Not clear!!!

And I think you will continue looking: that is not something I would want to do with a regex, particularly since you do not know the length of the sequence to be checked for.
Instead - since I assume this is for checking password strength - why not use existing code: Password Advisor[^] has code in VB, C# and JS.
 
Share this answer
 
Comments
Kim Togo 14-Jun-11 6:45am    
Good advice and link!
Sergey Alexandrovich Kryukov 14-Jun-11 11:47am    
Agree, I vote 5, too. I added just two cents...
--Sa
Repeating sequences do not really compromise password strength. Why do you think its main or even important criterion? Length of the password, using wider range of characters, not using words from dictionary are much more important. Password Advisor will know better :-)

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900