Search Postgresql Archives

Re: Detecting repeated phrase in a string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



På torsdag 09. desember 2021 kl. 15:46:05, skrev Shaozhong SHI <shishaozhong@xxxxxxxxx>:
Hi, Peter,
 
How to define word boundary as either by using
^  , space, or $
 
So that the following can be done
 
fox fox is a repeat
 
foxfox is not a repeat but just one word.
 
Do you want repeated phrase (list of words) ore repeated words?
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.
 
--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas@xxxxxxxxxx
www.visena.com
 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux