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

From Shaozhong SHI
Subject Can Postgres beat Oracle for regexp_count?
Date
Msg-id CA+i5JwaC87tdr4s=mzkBqPOrqp+sPHVEA+HmwRX0hh1ZBUNKkg@mail.gmail.com
Whole thread Raw
Responses Re: Can Postgres beat Oracle for regexp_count?  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
It has been found that regexp_count works brilliantly in Oracle.

However, it is not easy to replicate that in Postgres.  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')

County occurrences of 'My High Street' in one of the following strings:

'My High Street'    1
''                             0
'My High Street My High Street'   2

Can anyone enlighten all of us?

Regards,

David

pgsql-general by date:

Previous
From: Michael Lewis
Date:
Subject: Re: increasing effective_cache_size slows down join queries by a factor of 4000x
Next
From: "David G. Johnston"
Date:
Subject: Re: Can Postgres beat Oracle for regexp_count?