Regular Expressions 101

Community Patterns

Community Library Entry

-1

Regular Expression
PCRE (PHP <7.3)

/
(([0-9a-z-A-Z]+){1}+((\s+[a-zA-Z.,]+|\s+[a-zA-Z,.]+\s){2,10})?(\#[0-9a-z-\-]+|\#\s+[0-9\-]+|[0-9\-]+))
/
g

Description

Check provided street address is valid or not and also fetch it's all components.

Submitted by Dilip Borad - 10 years ago