From: Rob Sargent <robjsargent@gmail.com>
To: Shaozhong SHI <shishaozhong@gmail.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: Match 2 words and more
Date: Sat, 27 Nov 2021 17:37:33 -0700
Message-ID: <6791C12E-B9A3-4917-9113-186B2F26D708@gmail.com> (raw)
In-Reply-To: <CA+i5Jwbzej+34xLZvyVj1rM=SrXO1f+P4scaJUA2Y4xQfAJ0=A@mail.gmail.com>
References: <CA+i5Jwbzej+34xLZvyVj1rM=SrXO1f+P4scaJUA2Y4xQfAJ0=A@mail.gmail.com>
> On Nov 27, 2021, at 5:27 PM, Shaozhong SHI <shishaozhong@gmail.com> wrote:
>
>
> this is supposed to find those to have 2 words and more.
>
> select name FROM a_table where "STREET_NAME" ~ '^[[:alpha:]+ ]+[:alpha:]+$';
>
> But, it finds only one word as well.
>
> It appears that regex is not robust.
>
> Can anyone shed light on this?
>
> Regards,
>
Show the results of the query. Describe how those results differ from what you desire or from what you expect.
> David
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: robjsargent@gmail.com, shishaozhong@gmail.com
Subject: Re: Match 2 words and more
In-Reply-To: <6791C12E-B9A3-4917-9113-186B2F26D708@gmail.com>
References: <CA+i5Jwbzej+34xLZvyVj1rM=SrXO1f+P4scaJUA2Y4xQfAJ0=A@mail.gmail.com> <6791C12E-B9A3-4917-9113-186B2F26D708@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox