Match 2 words and more

From: Shaozhong SHI <shishaozhong(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Match 2 words and more
Date: 2021-11-28 00:27:34
Message-ID: CA+i5Jwbzej+34xLZvyVj1rM=SrXO1f+P4scaJUA2Y4xQfAJ0=A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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,

David

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2021-11-28 00:32:49 Re: Packaging pgAdmin 4
Previous Message Blake McBride 2021-11-27 20:25:40 Re: Packaging pgAdmin 4