Regular Expressions 101

Community Patterns

There does not seem to be anything here

Community Library Entry

2

Regular Expression
Python

r"
^1?$|^(11+?)\1+$
"

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 - 10 years ago