Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Created·2018-01-24 19:24
Flavor·PCRE (Legacy)

/
^(\w+(\s+\w+)*),\s?(\d+)\s+-\s+([\w-\s:]+(\s+\w+)*-?[\w+\s+:;]),\s?(\w+(\s+\w+)*)\s?-?\s?(\w+(\s+\w+)*),\s?(\w{2,})$
/
g
Open regex in editor

Description

Extract address parts from a Brazil Addressess (Logradouro/Street, Numero/Number, Complemento/Complement, Bairro/Neighborhood, Cidade/City, Estado/State)

Submitted by Glauber Portella <glauberportella@gmail.com>