Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id B7BE463337C for ; Fri, 11 Dec 2009 12:24:52 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 00462-01 for ; Fri, 11 Dec 2009 16:24:45 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from pyxis.powervt.com.ar (unknown [190.11.152.66]) by mail.postgresql.org (Postfix) with ESMTP id 1DAC06332EF for ; Fri, 11 Dec 2009 12:24:44 -0400 (AST) Received: from pcfhevia ([186.124.123.2]) by pyxis.powervt.com.ar (IPGroup Mail Server) with ASMTP id 1OT48953; Fri, 11 Dec 2009 13:24:39 -0300 From: "Fernando Hevia" To: "'Fernando Hevia'" , "'Oliveiros C,'" , References: Subject: Re: Is there any function to test for numeric ips? Date: Fri, 11 Dec 2009 13:26:00 -0300 Organization: IP-TEL Message-ID: <52EA9FD8B55A43D7B06F4B97DCC88DFE@iptel.com.ar> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 thread-index: Acp6e9GgFlceBlI8R9G0RypN/8nHqwAAO/WgAABvK8A= In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.101 tagged_above=-10 required=5 tests=BAYES_50=0.001, RDNS_NONE=0.1 X-Spam-Level: X-Archive-Number: 200912/40 X-Sequence-Number: 33478 > > 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}$'