Received: from dell-laptop01.officenet.no (dell-laptop01.officenet.no [193.212.174.122]) by postgresql.org (Postfix) with ESMTP id 7EB4B4758E7 for ; Tue, 9 Apr 2002 07:49:38 -0400 (EDT) Received: by dell-laptop01.officenet.no (Postfix, from userid 502) id 086CA4FD44; Tue, 9 Apr 2002 13:49:36 +0200 (CEST) Content-Type: text/plain; charset="iso-8859-1" From: Andreas Joseph Krogh Organization: OfficeNet AS To: =?iso-8859-1?q?S=F8ren=20Vainio?= , "'pgsql-sql@postgresql.org'" Subject: Re: Scadinavian characters in regular expressions Date: Tue, 9 Apr 2002 13:49:36 +0200 X-Mailer: KMail [version 1.4] References: <910513A5A944D5118BE900C04F67CB5A1F82C6@MAIL> In-Reply-To: <910513A5A944D5118BE900C04F67CB5A1F82C6@MAIL> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200204091349.36146.andreak@officenet.no> X-Archive-Number: 200204/94 X-Sequence-Number: 7359 On Tuesday 09 April 2002 13:28, S=F8ren Vainio wrote: > Using \s does produce FALSE for SELECT 'one=E5 two three' ~ > '^[^\s]+[\s][^\s]+$'; > But it also produces FALSE for any two-word string ex: > SELECT 'one two' ~ '^[^\s]+[\s][^\s]+$'; where I would expect TRUE??? > (I am using PostgreSQL 7.1.3) Funny, in Perl it works: perl -e '$p =3D "hei hopp"; print eval ($p =3D~ /^[^\s]+\s[^\s]+$/) ? "true= \n" :=20 "false\n";' prints: true --=20 Andreas Joseph Krogh (Senior Software Developer) A hen is an egg's way of making another egg.