Re: Regex for Word space Word space Word .... - Mailing list pgsql-general

From Shaozhong SHI
Subject Re: Regex for Word space Word space Word ....
Date
Msg-id CA+i5JwaFRLAKH0yJ3ZvJQfGxbzdjiw_kXJhJsA9od0+OZR4Gag@mail.gmail.com
Whole thread Raw
In response to Re: Regex for Word space Word space Word ....  (chlor <hans.schou@gmail.com>)
Responses Re: Regex for Word space Word space Word ....  (Saurabh Agrawal <mail@saurabhagrawal.net>)
Re: Regex for Word space Word space Word ....  (Andreas Joseph Krogh <andreas@visena.com>)
List pgsql-general
It only matches First Street from 'My First Street'.

I was trying to make it to match words starting capital letter only.

Regards,
David

On Tue, 23 Nov 2021 at 10:59, chlor <hans.schou@gmail.com> wrote:
On Tue, Nov 23, 2021 at 11:51 AM Shaozhong SHI <shishaozhong@gmail.com> wrote:
I tried nested regex  '[[A-Z][a-z] ]+[[A-Z][a-z]]' but it did not work.

[A-Z][a-z]+ +[A-Z][a-z]+

Try this instead
[A-Za-z]+ +[A-Za-z]+


And try also this editor to learn regex

./hans

pgsql-general by date:

Previous
From: chlor
Date:
Subject: Re: Regex for Word space Word space Word ....
Next
From:
Date:
Subject: PQexecParams, placeholders and variable lists of params