[postgis-users] Any robust regex for searching out addresses?

Paul Ramsey pramsey at cleverelephant.ca
Sun May 3 11:50:44 PDT 2020


Also, 

https://docs.google.com/presentation/d/1Fgc_2dzWAzT--HdMEiWj2fFLJNnpxPXmnYXx9Js3xjE/edit#slide=id.g6404bf8f4e_0_0

> On May 3, 2020, at 11:49 AM, Paul Ramsey <pramsey at cleverelephant.ca> wrote:
> 
> create extension address_standardizer
> 
> https://postgis.net/docs/postgis_installation.html#installing_pagc_address_standardizer
> 
>> On May 3, 2020, at 11:43 AM, Jo <winfixit at gmail.com> wrote:
>> 
>> It would help if you had a bigger sample of valid addresses.
>> 
>> This may be a good starting point:
>> 
>> (\d+)(\w*)(-)?(\d+)(\w*)(\s)([\w\s]+),\s?([\w\s]+),\s?([\w\s]+)
>> 
>> https://pythex.org/?regex=(%5Cd%2B)(%5Cw*)(-)%3F(%5Cd%2B)(%5Cw*)(%5Cs)(%5B%5Cw%5Cs%5D%2B)%2C%5Cs%3F(%5B%5Cw%5Cs%5D%2B)%2C%5Cs%3F(%5B%5Cw%5Cs%5D%2B)&test_string=223A-5D%20Great%20Avenue%2C%20A%20City%2C%20Planet%20Earth&ignorecase=0&multiline=0&dotall=0&verbose=0  
>> 
>> Jo
>> 
>> On Sun, May 3, 2020 at 2:30 PM Shaozhong SHI <shishaozhong at gmail.com> wrote:
>> Hello,
>> 
>> Any robust regex for searching out addresses?
>> 
>> The text patterns is as follows:
>> 
>> 223A-5D Great Avenue, A City, Planet Earth
>> 
>> A robust regex needs to be constructed and tested.
>> 
>> Any clue?
>> 
>> Regards,
>> 
>> Shao
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/postgis-users
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/postgis-users
> 



More information about the postgis-users mailing list