Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^(?:.?|(..+?)\1+)$
/
gm

Description

All characters have to be the same

Matches non-primes

Submitted by nopeless | u/kattskill - 2 years ago