RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Repeating characters limit
Expression
^((.)(?!\2{2,}))+$
Description
This pattern matches strings where no more than two equal characters may come in succession. To modify the amount of characters allowed, change the second number (the two inside "{2,}")to the desired limit.
Matches
Abba | p4ssw0rd | Whatever
Non-Matches
Abbba | p4sssw0rd | Whateverrr
Author Rating: Not yet rated. Fredrik Schiller
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials