[postgis-users] One line solution: select a dirty full address and get a clean address

Shaozhong SHI shishaozhong at gmail.com
Sat Dec 19 14:40:53 PST 2020


For instance,

We may encounter,

My Great Place. 101-103--a, Great Avenue,              London, , SW3 5EE

Can we do some thing like

SELECT
    REGEXP_MATCHES(' My Great' Place. 101-103--a, Great Avenue,
  London, , SW3 5EE ',
         a_regular_expression,
        'g');

so that we end up a clean address line with one line of code?

My Great Place 101-103a Great Avenue London SW3 5EE

What regex is that?

Can we guarantee a single space between words?

Regards,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20201219/82f34a2b/attachment.html>


More information about the postgis-users mailing list