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