Regular Expressions 101

Community Patterns

4-digit numeric w/o leading zero and no repeat digits

1

Regular Expression
PCRE (PHP <7.3)

/
^([1-9])(?!\1)([0-9])(?!\1|\2)([0-9])(?!\1|\2|\3)([0-9])$
/
gm

Description

no description available

Submitted by anonymous - 9 years ago