Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
Created·2016-02-04 21:05
Flavor·PCRE (Legacy)

/
\b(?![01]*([01])\1{4})[01]+\b
/
gm
Open regex in editor

Description

0111100 will be matched whereas 0111110 will not. Change \1{4} to max repeating count. For max 9 repeating -> \1{9}

Submitted by anonymous