From: Nicholas I <nicholas.domnic.i@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Need a help in regexp
Date: Thu, 6 May 2010 20:18:26 +0530
Message-ID: <k2oe13d0d11005060748l4eaf0ac2g9b1db464c524b8e4@mail.gmail.com> (raw)
Hi,
Need a help in regexp!
I have a table in which the data's are entered like,
Example:
One (1)
Two (2)
Three (3)
I want to extract the data which is only within the parentheses.
that is
1
2
3
i have written a query,
*select regexp_matches(name,'([^(]+)([)]+)','g') from table;*
which outputs the data as,
{"test"}
{"test2"}
Thank You
Nicholas I
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: nicholas.domnic.i@gmail.com
Subject: Re: Need a help in regexp
In-Reply-To: <k2oe13d0d11005060748l4eaf0ac2g9b1db464c524b8e4@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox