Re: Scadinavian characters in regular expressions - Mailing list pgsql-sql

From Andreas Joseph Krogh
Subject Re: Scadinavian characters in regular expressions
Date
Msg-id 200204091349.36146.andreak@officenet.no
Whole thread Raw
In response to Re: Scadinavian characters in regular expressions  (Søren Vainio <sva@Netpointers.com>)
List pgsql-sql
On Tuesday 09 April 2002 13:28, Søren Vainio wrote:
> Using \s does produce FALSE for SELECT 'oneå 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 = "hei hopp"; print eval ($p =~ /^[^\s]+\s[^\s]+$/) ? "true\n" :
"false\n";'

prints:
true


--
Andreas Joseph Krogh (Senior Software Developer) <andreak@officenet.no>
A hen is an egg's way of making another egg.


pgsql-sql by date:

Previous
From: Søren Vainio
Date:
Subject: Re: Scadinavian characters in regular expressions
Next
From: "Kancha ."
Date:
Subject: replace NULL