Regular Expressions 101

Community Patterns

match street address

0

Regular Expression
PCRE (PHP <7.3)

/
^\d{1,6}\s(?:[A-Za-z0-9#]+\s){0,7}(?:[A-Za-z0-9 _]*$)
/
gm

Description

match street address with no more than 6 numbers and no special characters

Submitted by anonymous - 2 years ago