Re: Can Postgres beat Oracle for regexp_count? - Mailing list pgsql-general

From David G. Johnston
Subject Re: Can Postgres beat Oracle for regexp_count?
Date
Msg-id CAKFQuwZtR5mMG5Girp1qkX0YbBaEG9pZ+oreqXgfp9y-SnRkjQ@mail.gmail.com
Whole thread Raw
In response to Can Postgres beat Oracle for regexp_count?  (Shaozhong SHI <shishaozhong@gmail.com>)
Responses Re: Can Postgres beat Oracle for regexp_count?
List pgsql-general
On Wed, Feb 2, 2022 at 1:20 PM Shaozhong SHI <shishaozhong@gmail.com> wrote:
It has been found that regexp_count works brilliantly in Oracle.

What query exactly did you execute in Oracle that you wish to see if an equivalent can be formulated in PostgreSQL?

However, it is not easy to replicate that in Postgres.

Given we don't have a regexp_count function this isn't surprising...

 
  The following codes have been experimented but without any luck.

select regexp_matches('My High Street', '([A-Z][a-z]+[\s])', 'g')

select regexp_matches('My High Street', '([A-Z][a-z]+[\s]*)', 'g')

See my first point.

David J.

pgsql-general by date:

Previous
From: Shaozhong SHI
Date:
Subject: Can Postgres beat Oracle for regexp_count?
Next
From: Artyom Shaposhnikov
Date:
Subject: Re: increasing effective_cache_size slows down join queries by a factor of 4000x