Dup Ver Goto 📝

Regex To Detect Composite Numbers

PT2/lang/regex python regex prime does not exist
To
5 lines, 31 words, 188 chars Page 'PrimeTest1' does not exist.

This regular expression (in Python) detects strings of 1's whose length is composite. So strings of all 1's that do not match are prime in length.

r = re.compile(r"^(11+)(\1+)$")