Re: Match 2 words and more - Mailing list pgsql-general

From Guyren Howe
Subject Re: Match 2 words and more
Date
Msg-id ADC6377F-C58E-428B-966B-F77C93ABF816@gmail.com
Whole thread Raw
In response to Match 2 words and more  (Shaozhong SHI <shishaozhong@gmail.com>)
List pgsql-general
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:]]+$’;

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Match 2 words and more
Next
From: "David G. Johnston"
Date:
Subject: Re: Match 2 words and more