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

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details 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
   Displaying page 1 of 1 pages; Items 1 to 1

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