Regular Expressions 101

Community Patterns

Street number

1

Regular Expression
PCRE (PHP <7.3)

/
[a-z]+[\s,]+[n\.\°\s]*([\d]+[-\/\._]?[\d]*[a-z]*[\d]*|[s][n][c])[ ,]*.*
/
gmi

Description

Extract the street number and the remainder part from the address

Submitted by anonymous - 4 years ago