regexp idea - Mailing list pgsql-general

From AI Rumman
Subject regexp idea
Date
Msg-id CAGoODpf4S1M-Q=Jwgk=PcsWhPLJUuLkgWmOAaozYekfOteN07g@mail.gmail.com
Whole thread Raw
Responses Re: regexp idea  (David Johnston <polobo@yahoo.com>)
Re: regexp idea  (Rob Sargent <robjsargent@gmail.com>)
List 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.

pgsql-general by date:

Previous
From: David Johnston
Date:
Subject: Re: how to use aggregate functions in this case
Next
From: David Johnston
Date:
Subject: Re: regexp idea