Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
^ --start (1?[\-\.\_]?) question mark makes the block or single character before it optional ([0-9]{3}) (-?) ([0-9]{4}) $
/

Description

First Test Regex

Submitted by anonymous - 9 years ago