Community Patterns

Community Library Entry

1

Regular Expression
Created·2024-02-15 21:02
Updated·2024-02-15 21:06
Flavor·PCRE2 (PHP)

/
^(?!(.{2,})\g1+$).{2,}$
/
gm
Open regex in editor

Description

Matches all lines whose length is a prime number and only contain the character "1".

Submitted by pablo