Re: Regex for Word space Word space Word ....

From: Shaozhong SHI <shishaozhong(at)gmail(dot)com>
To: chlor <hans(dot)schou(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Regex for Word space Word space Word ....
Date: 2021-11-23 11:25:29
Message-ID: CA+i5JwaFRLAKH0yJ3ZvJQfGxbzdjiw_kXJhJsA9od0+OZR4Gag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)schou(at)gmail(dot)com> wrote:

> On Tue, Nov 23, 2021 at 11:51 AM Shaozhong SHI <shishaozhong(at)gmail(dot)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]+
> will match 'Hello World', but not 'Hello world'. Is that what you want?
>
> Try this instead
> [A-Za-z]+ +[A-Za-z]+
>
>
> And try also this editor to learn regex
> https://regex101.com/
>
> ./hans
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message tomas 2021-11-23 11:37:15 PQexecParams, placeholders and variable lists of params
Previous Message chlor 2021-11-23 10:59:03 Re: Regex for Word space Word space Word ....