pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Joseph Krogh <andreas@visena.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Regex for Word space Word space Word ....
Date: Tue, 23 Nov 2021 13:32:58 +0100 (CET)
Message-ID: <VisenaEmail.66.722aa014626d9b9e.17d4cc64a8a@tc7-visena> (raw)
In-Reply-To: <CA+i5JwaFRLAKH0yJ3ZvJQfGxbzdjiw_kXJhJsA9od0+OZR4Gag@mail.gmail.com>
References: <CA+i5JwYnphk2jfa8yUxmQsJmgmmYP=N08yMm=MmsJopW667sKQ@mail.gmail.com>
	<CA+i5JwZnbBu7AaQyYBiLSeyA+C3ipfszHRL4rRbjbfo4C=MBNA@mail.gmail.com>
	<CAApBw35LG3hg=YS=G5piOiSgQ45c-CHEqMPobF-k2NFj6vdXNQ@mail.gmail.com>
	<CA+i5JwaFRLAKH0yJ3ZvJQfGxbzdjiw_kXJhJsA9od0+OZR4Gag@mail.gmail.com>


På tirsdag 23. november 2021 kl. 12:25:29, skrev Shaozhong SHI <
shishaozhong@gmail.com <mailto:shishaozhong@gmail.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@visena.com <mailto:andreas@visena.com>
www.visena.com <https://www.visena.com;
 <https://www.visena.com;

view thread (9+ messages)  latest in thread

Message-ID: <VisenaEmail.66.722aa014626d9b9e.17d4cc64a8a@tc7-visena>
Permalink:  ../VisenaEmail.66.722aa014626d9b9e.17d4cc64a8a@tc7-visena/
Also on:    postgresql.org/message-id/VisenaEmail.66.722aa014626d9b9e.17d4cc64a8a@tc7-visena

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: andreas@visena.com
  Subject: Re: Regex for Word space Word space Word ....
  In-Reply-To: <VisenaEmail.66.722aa014626d9b9e.17d4cc64a8a@tc7-visena>
  References: <CA+i5JwYnphk2jfa8yUxmQsJmgmmYP=N08yMm=MmsJopW667sKQ@mail.gmail.com> <CA+i5JwZnbBu7AaQyYBiLSeyA+C3ipfszHRL4rRbjbfo4C=MBNA@mail.gmail.com> <CAApBw35LG3hg=YS=G5piOiSgQ45c-CHEqMPobF-k2NFj6vdXNQ@mail.gmail.com> <CA+i5JwaFRLAKH0yJ3ZvJQfGxbzdjiw_kXJhJsA9od0+OZR4Gag@mail.gmail.com> <VisenaEmail.66.722aa014626d9b9e.17d4cc64a8a@tc7-visena>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox