Re: Major Problem with locale - Mailing list pgsql-general

From Jeff Eckermann
Subject Re: Major Problem with locale
Date
Msg-id 20020930211558.95503.qmail@web20805.mail.yahoo.com
Whole thread Raw
In response to Major Problem with locale  ("Ben-Nes Michael" <miki@canaan.co.il>)
List pgsql-general
--- Ben-Nes Michael <miki@canaan.co.il> wrote:
> Hi All
>
> I posted a message about regex pattern matching
> using hebrew letters.
>
If all else fails, and you really want to use regular
expressions, you can "import" the regular expression
capability of a Procedural Language, like:

create or replace function perl_match(text, text)
returns boolean as '
if ($_[0] =~ m/$_[1]/) {return true}
   else {return false};
' language 'plperl';

jeck=# select perl_match('a','\\x61');
 perl_match
------------
 t
(1 row

Note the need to double the backslashes.
Using hex (or octal) escapes will enable you to match
any ascii character.  I don't believe that PostgreSQL
regular expressions support this (at least, I couldn't
get it to work).

Perl 5.6 also supports unicode, although I don't know
how that is implemented for regular expression matching.

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [SQL] CURRENT_TIMESTAMP
Next
From: Tom Lane
Date:
Subject: Re: [SQL] CURRENT_TIMESTAMP