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 64B01D822C for ; Tue, 6 Sep 2005 12:34:07 -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 93363-10 for ; Tue, 6 Sep 2005 15:33:59 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.197.194]) by svr1.postgresql.org (Postfix) with SMTP id 30DB2D81E8 for ; Tue, 6 Sep 2005 12:33:57 -0300 (ADT) Received: (qmail 3378 invoked by uid 500); 6 Sep 2005 15:33:56 -0000 Date: Tue, 6 Sep 2005 10:33:56 -0500 From: Bruno Wolff III To: Peter Eisentraut Cc: Aldor , pgsql-sql@postgresql.org Subject: Re: POSIX Regular Expression question Message-ID: <20050906153356.GD30161@wolff.to> Mail-Followup-To: Bruno Wolff III , Peter Eisentraut , Aldor , pgsql-sql@postgresql.org References: <431C4EB2.80401@mediaroot.de> <200509051619.29210.peter_e@gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200509051619.29210.peter_e@gmx.net> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200509/62 X-Sequence-Number: 22609 On Mon, Sep 05, 2005 at 16:19:28 +0200, Peter Eisentraut wrote: > Am Montag, 5. September 2005 15:57 schrieb Aldor: > > I want to get out a string only with characters A-Za-z. > > Any idea how to do this in Postgres with POSIX Regex? > > Presumably, > > colname ~ '^[A-Za-z]*$' > > If you want to be independent of locale issues, then you'd have to enumerate > all the letters instead of using a range specification. Or use: colname ~ '^[[:alpha:]]*$'