Community Patterns

Community Library Entry

2

Regular Expression
Created·2015-07-31 13:12
Flavor·Python

r"
^1?$|^(11+?)\1+$
"
Open regex in editor

Description

Given a number N represented by its unary form N(1), when RegEx doesn't match N(1), N is prime

Submitted by LexDias