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

From: Andreas Joseph Krogh <andreas(at)visena(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Regex for Word space Word space Word ....
Date: 2021-11-23 12:32:58
Message-ID: VisenaEmail.66.722aa014626d9b9e.17d4cc64a8a@tc7-visena
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


På tirsdag 23. november 2021 kl. 12:25:29, skrev Shaozhong SHI <
shishaozhong(at)gmail(dot)com <mailto:shishaozhong(at)gmail(dot)com>>:

It only matches First Street from 'My First Street'.

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

You'll want to include unicode-characters, which [A-Z] approach doesn't handle
well.

How about:

select regexp_matches('Åge is a Man', E'[[:upper:]]\\w+', 'g');

--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com>
<https://www.visena.com>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Matthias Apitz 2021-11-23 12:39:49 Re: SELECT fails to present result rows depending on the columns to show
Previous Message Saurabh Agrawal 2021-11-23 12:08:38 Re: Regex for Word space Word space Word ....