Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Python

r"
(?P<street>\d+\s.*?(?:,\s*\w*\s*\d+)*),\s*(?P<city>.*?),\s*(?P<state>[A-Za-z]+)\s*(?P<zip>\d+)?,*
"
gm

Description

Complex address component capturing regex

Submitted by anonymous - 4 years ago