Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 1BE2B633854 for ; Thu, 6 May 2010 11:48:35 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 63058-03 for ; Thu, 6 May 2010 14:48:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-vw0-f46.google.com (mail-vw0-f46.google.com [209.85.212.46]) by mail.postgresql.org (Postfix) with ESMTP id 3DE12632E67 for ; Thu, 6 May 2010 11:48:28 -0300 (ADT) Received: by vws13 with SMTP id 13so32930vws.19 for ; Thu, 06 May 2010 07:48:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=KzVnDwoEabmplyIuJLhr2hDPV0y7+GvzPgsJlZAnq2A=; b=Uga/QbmEo89SZOY++m+u+fcqjnc25FSxJxZnJu9Hhw0WPFL2zhfmCCE/KngnC8feR7 8lXExiQaWafiHTHw5tVqXbySb2REbG+TrK081T4pI35cdheuMxRMB4orNi9n6BPoQznS wOqdd+WnbmzYJkLetq/z/ElYUrr7IkxahZZkk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=T9nwsTW3rKbUJmSUPVQoe5L7gpc1Qne4N2PlfRESYvN9eFHUs7Wvom8nkQwAOBcxxw ewe9Sk0zci24/1cnwHD6Fzp+SK7NDFSamInoMCLlc3G7OybXZNaDKxu00hmtvllH6MR+ x3nsMGOxo/7T0fSB3ad2zQGiR9Pzg0Rw5w5rE= MIME-Version: 1.0 Received: by 10.220.107.94 with SMTP id a30mr2285640vcp.135.1273157306414; Thu, 06 May 2010 07:48:26 -0700 (PDT) Received: by 10.220.64.103 with HTTP; Thu, 6 May 2010 07:48:26 -0700 (PDT) Date: Thu, 6 May 2010 20:18:26 +0530 Message-ID: Subject: Need a help in regexp From: Nicholas I To: pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary=00c09f8de75dfe00ad0485ee087c X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=-5 required=5 tests=BAYES_40=-0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201005/21 X-Sequence-Number: 34069 --00c09f8de75dfe00ad0485ee087c Content-Type: text/plain; charset=ISO-8859-1 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 --00c09f8de75dfe00ad0485ee087c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,<= br>
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 --00c09f8de75dfe00ad0485ee087c--