Regular Expressions 101

Community Patterns

/software version

1

Regular Expression
PCRE (PHP <7.3)

/
^(([0-9]{1,3})|(([0-9]{1,3})[.]([0-9]{1,3}))|(([0-9]{1,3})[.]([0-9]{1,3})[.]([0-9]{1,3})))$
/
gm

Description

only xxx , xxx.xxx and xxx.xxx.xxx are allowed

Submitted by neha tiwari - 8 years ago