X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3F7A6D6F3F for ; Mon, 5 Sep 2005 11:11:28 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 10759-01 for ; Mon, 5 Sep 2005 14:11:22 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by svr1.postgresql.org (Postfix) with ESMTP id CACE5D6D7B for ; Mon, 5 Sep 2005 11:11:23 -0300 (ADT) Received: from [194.25.154.138] (helo=webserv.wug.de) by mrelayeu.kundenserver.de with ESMTP (Nemesis), id 0MKxQS-1ECHh115ek-0003cI; Mon, 05 Sep 2005 16:11:27 +0200 Received: from kretschmer by webserv.wug.de with local (Exim 3.36 #1) id 1ECHiY-0002mk-00 for pgsql-sql@postgresql.org; Mon, 05 Sep 2005 16:13:02 +0200 Date: Mon, 5 Sep 2005 16:13:02 +0200 From: "A. Kretschmer" To: pgsql-sql@postgresql.org Subject: Re: POSIX Regular Expression question Message-ID: <20050905141302.GE29043@webserv.wug-glas.de> Mail-Followup-To: "A. Kretschmer" , pgsql-sql@postgresql.org References: <431C4EB2.80401@mediaroot.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <431C4EB2.80401@mediaroot.de> X-DEST: 208 X-MSMail-Priority: High X-Message-Flag: Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) X-OS: Linux - weil ich es mir Wert bin! X-Info: registrierter Linux-User 97922 http://counter.li.org User-Agent: mutt-ng 1.5.9i (Linux) X-Provags-ID: kundenserver.de abuse@kundenserver.de login:51ea9561fc3f6d9539a2acd743e4748c X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.293 required=5 tests=[AWL=0.026, MISSING_MIMEOLE=0, X_MSMAIL_PRIORITY_HIGH=0.267] X-Spam-Level: X-Archive-Number: 200509/31 X-Sequence-Number: 22578 am 05.09.2005, um 14:57:06 +0100 mailte Aldor folgendes: > Hi, > > I want to get out a string only with characters A-Za-z. like this? test=# select * from foo; s -------- 123 abz abz123 (3 rows) test=# select * from foo where s ~ '^[a-zA-Z]+$'; s ----- abz (1 row) > Any idea how to do this in Postgres with POSIX Regex? The term '[a-zA-Z]+' means: this chars at least one times, the '^' and '$' are anchors to the begin and end of the line. Hope that helps, Regards, Andreas -- Andreas Kretschmer (Kontakt: siehe Header) Heynitz: 035242/47212, D1: 0160/7141639 GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net === Schollglas Unternehmensgruppe ===