Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^\d$|^\d\s\d$|^\d\s\d\s\d$|^\d\s\d\s\d\s\d$
/
gm

Description

match the string

0 0 1 0 1 2 0 1 2 3

Submitted by Lyu JH - 6 years ago