pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Joseph Krogh <andreak@officenet.no>
To: Søren Vainio <sva@Netpointers.com>
To: 'pgsql-sql@postgresql.org' <pgsql-sql@postgresql.org>
Subject: Re: Scadinavian characters in regular expressions
Date: Tue, 9 Apr 2002 13:49:36 +0200
Message-ID: <200204091349.36146.andreak@officenet.no> (raw)
In-Reply-To: <910513A5A944D5118BE900C04F67CB5A1F82C6@MAIL>
References: <910513A5A944D5118BE900C04F67CB5A1F82C6@MAIL>

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.



view thread (7+ messages)  latest in thread

Message-ID: <200204091349.36146.andreak@officenet.no>
Permalink:  ../200204091349.36146.andreak@officenet.no/
Also on:    postgresql.org/message-id/200204091349.36146.andreak@officenet.no

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: andreak@officenet.no, sva@Netpointers.com
  Subject: Re: Scadinavian characters in regular expressions
  In-Reply-To: <200204091349.36146.andreak@officenet.no>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox