Search Postgresql Archives

not like perl..

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

 



I have a simple table with a varchar(32) field that I am trying to extract data using regular expressions.

select * from spam where inetaddr like '100.%'
row | inetaddr | tdate ------+--------------+---------------------------
3245 | 100.81.98.51 | 03/08/2011 07:21:19.29209    -----works fine


select * from spam where inetaddr like E'\d\d\d.%'
row | inetaddr | tdate
-----+----------+-------
(0 rows) --- zip ???????????

slect * from spam where inetaddr like E'\d.%'
row | inetaddr | tdate -------+--------------------------------+---------------------------- 49424 | d.russell_ul@xxxxxxxxxxxxxxxxx | 03/27/2011 15:46:41.110566 ??????????? though \d was a digit match????


select * from spam where inetaddr like E'\\d.%'
row | inetaddr | tdate -------+--------------------------------+---------------------------- 49424 | d.russell_ul@xxxxxxxxxxxxxxxxx | 03/27/2011 15:46:41.110566 ???????????


What am I doing wrong???

thanks

hook@xxxxxxx



--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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