regexp idea

From: AI Rumman <rummandba(at)gmail(dot)com>
To: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: regexp idea
Date: 2013-08-27 18:44:44
Message-ID: CAGoODpf4S1M-Q=Jwgk=PcsWhPLJUuLkgWmOAaozYekfOteN07g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have a string like:
Gloucester Catholic vs. St. Augustine baseball, South Jersey Non-Public A
final, June 5, 2013

I need to extract date part from the string.

I used the follows:
regexp_matches(title,'[.* ]+\ (Jul|August|Sep)[, a-zA-Z0-9]+' )

But it gives me result August as it stops at "Augustine".

In my case, date can be in different formats, some record may use "," or
some may not.

Any idea to achieve this?

Thanks.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Johnston 2013-08-27 19:15:39 Re: regexp idea
Previous Message David Johnston 2013-08-27 18:27:06 Re: how to use aggregate functions in this case