From: Nicholas I <nicholas.domnic.i@gmail.com>
To: pgsql-general@postgresql.org
Subject: Fwd: Need a help in regexp
Date: Thu, 6 May 2010 20:23:01 +0530
Message-ID: <l2se13d0d11005060753gae1c4069j167a659a28213d5d@mail.gmail.com> (raw)
In-Reply-To: <k2oe13d0d11005060748l4eaf0ac2g9b1db464c524b8e4@mail.gmail.com>
References: <k2oe13d0d11005060748l4eaf0ac2g9b1db464c524b8e4@mail.gmail.com>
---------- Forwarded message ----------
From: Nicholas I <nicholas.domnic.i@gmail.com>
Date: Thu, May 6, 2010 at 8:18 PM
Subject: Need a help in regexp
To: pgsql-sql@postgresql.org
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, pgsql-general@postgresql.org
Subject: Re: Fwd: Need a help in regexp
In-Reply-To: <l2se13d0d11005060753gae1c4069j167a659a28213d5d@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