Search Postgresql Archives

Fwd: Need a help in regexp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





---------- Forwarded message ----------
From: Nicholas I <nicholas.domnic.i@xxxxxxxxx>
Date: Thu, May 6, 2010 at 8:18 PM
Subject: Need a help in regexp
To: pgsql-sql@xxxxxxxxxxxxxx


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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux