pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guyren Howe <guyren@gmail.com>
To: Shaozhong SHI <shishaozhong@gmail.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Match 2 words and more
Date: Sat, 27 Nov 2021 16:56:25 -0800
Message-ID: <ADC6377F-C58E-428B-966B-F77C93ABF816@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 16:27 , Shaozhong SHI <shishaozhong@gmail.com> wrote:
> 
> select name FROM a_table where "STREET_NAME" ~ '^[[:alpha:]+ ]+[:alpha:]+$’;

The simplest thing that does what you says is I think:

select name FROM a_table where "STREET_NAME" ~ ‘^([[:alpha:]]+\s)+[[:alpha:]]+$’;

view thread (9+ messages)  latest in thread

Message-ID: <ADC6377F-C58E-428B-966B-F77C93ABF816@gmail.com>
Permalink:  ../ADC6377F-C58E-428B-966B-F77C93ABF816@gmail.com/
Also on:    postgresql.org/message-id/ADC6377F-C58E-428B-966B-F77C93ABF816@gmail.com

 · 

reply

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: guyren@gmail.com, shishaozhong@gmail.com
  Subject: Re: Match 2 words and more
  In-Reply-To: <ADC6377F-C58E-428B-966B-F77C93ABF816@gmail.com>
  References: <CA+i5Jwbzej+34xLZvyVj1rM=SrXO1f+P4scaJUA2Y4xQfAJ0=A@mail.gmail.com> <ADC6377F-C58E-428B-966B-F77C93ABF816@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