Re: Detecting repeated phrase in a string - Mailing list pgsql-general

From Peter J. Holzer
Subject Re: Detecting repeated phrase in a string
Date
Msg-id 20211209195230.c4k2khw5znijnvrl@hjp.at
Whole thread Raw
In response to Re: Detecting repeated phrase in a string  (Andreas Joseph Krogh <andreas@visena.com>)
List pgsql-general
On 2021-12-09 16:11:31 +0100, Andreas Joseph Krogh wrote:
> For repeated words (including unicode-chars) you can do:
>  
> (\b\p{L}+\b)(?:\s+\1)+
>  
> I'm not quite sure how to translate this to PG, but in JAVA it works.

See https://www.postgresql.org/docs/11/functions-matching.html#POSIX-CONSTRAINT-ESCAPES-TABLE

        hp

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachment

pgsql-general by date:

Previous
From: "Phil Endecott"
Date:
Subject: Re: Advice on using materialized views
Next
From: Jeff Abrahamson
Date:
Subject: pqxx accumulating a transaction