pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fernando Hevia <fhevia@ip-tel.com.ar>
To: 'Fernando Hevia' <fhevia@ip-tel.com.ar>
To: 'Oliveiros C,' <oliveiros.cristina@marktest.pt>
To: pgsql-sql@postgresql.org
Subject: Re: Is there any function to test for numeric ips?
Date: Fri, 11 Dec 2009 13:26:00 -0300
Message-ID: <52EA9FD8B55A43D7B06F4B97DCC88DFE@iptel.com.ar> (raw)
In-Reply-To: <D417D556031146289BCD9BA0F96F20DB@iptel.com.ar>
References: <E94D918326D044C69895D829038E31B2@marktestcr.marktest.pt>
	<D417D556031146289BCD9BA0F96F20DB@iptel.com.ar>

 

> 
> You could filter IP out with a regular expression:
> 
> select hostname as hosts_not_ip
> from table
> where hostname !~ '^[0-9]\.[0-9]\.[0-9]\.[0-9]$'
> 

Oops, i missed something. Its:

select hostname as hosts_not_ip
from table
where hostname !~ '^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$'





view thread (6+ messages)  latest in thread

Message-ID: <52EA9FD8B55A43D7B06F4B97DCC88DFE@iptel.com.ar>
Permalink:  ../52EA9FD8B55A43D7B06F4B97DCC88DFE@iptel.com.ar/
Also on:    postgresql.org/message-id/52EA9FD8B55A43D7B06F4B97DCC88DFE@iptel.com.ar

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: fhevia@ip-tel.com.ar, oliveiros.cristina@marktest.pt
  Subject: Re: Is there any function to test for numeric ips?
  In-Reply-To: <52EA9FD8B55A43D7B06F4B97DCC88DFE@iptel.com.ar>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox