Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 22EA4632C49 for ; Thu, 6 May 2010 11:53:17 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 36502-06 for ; Thu, 6 May 2010 14:53:08 +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 A7128633F10 for ; Thu, 6 May 2010 11:53:02 -0300 (ADT) Received: by mail-vw0-f46.google.com with SMTP id 13so37293vws.19 for ; Thu, 06 May 2010 07:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=IQfDHVI0dJKRWUvQDOBQQsPFAFFCFBriBX7cJGiMlp0=; b=HgaKEvimVbBMQT1EOSnhKwJ9CYwEgs1jW7TCmTc5jG3fKHjV/DTqkglf82aL5lrD9i YzYMTGhnF3Jb5E/OGyFN9nanxrVUGZY+P59DzrGYc/pjKYcxlcBXOuZuMfLVZgP039GN GQGya3cFkLpY49Kte8FHSZWTab4hqxeUx3hmg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=lSzdLO8F3eo0+4eYBzptuIMeW9Mv+WpW3Y8bQVMXN11LoUhNrtHbj8npXTn8WgQPV6 sintpU7LLPe4RJM1ch4Y3ZU8wB5toDlUlvhFtK7ybpjB8E+3P/KHO5OY9KgDR5zMpqoj /qWkd7+iJmyxPU0nZpPi81s7QofRz4SnS57ec= MIME-Version: 1.0 Received: by 10.220.128.136 with SMTP id k8mr3181340vcs.178.1273157581434; Thu, 06 May 2010 07:53:01 -0700 (PDT) Received: by 10.220.64.103 with HTTP; Thu, 6 May 2010 07:53:01 -0700 (PDT) In-Reply-To: References: Date: Thu, 6 May 2010 20:23:01 +0530 Message-ID: Subject: Fwd: Need a help in regexp From: Nicholas I To: pgsql-general@postgresql.org Content-Type: multipart/alternative; boundary=e0cb4e88758962706a0485ee1908 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/231 X-Sequence-Number: 162600 --e0cb4e88758962706a0485ee1908 Content-Type: text/plain; charset=ISO-8859-1 ---------- Forwarded message ---------- From: Nicholas I 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 --e0cb4e88758962706a0485ee1908 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

---------- Forwarded message ----------<= br>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 ar= e 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=

--e0cb4e88758962706a0485ee1908--