Regular expression

Поиск
Список
Период
Сортировка
От Vyacheslav Kalinin
Тема Regular expression
Дата
Msg-id 9b1af80e0804261248g68e3993cx6a1d2f9174fd73ed@mail.gmail.com
обсуждение исходный текст
Ответы Re: Regular expression
Список pgsql-general
Hello,

Case insensitive pattern matching gives strange results for non-ascii character (such as UTF-8 encoded cyrillic letters):
test=# select 'б' ~* 'Б' ;
?column?
----------
f
(1 row)
( 'б' and 'Б' are lower and upper case variants of cyrillic 'B')

at the same time:
test=# select 'б' ilike 'Б' ;
?column?
----------
t
(1 row)

(PG 8.3 on Linux, UTF-8 locale)

Also, what could be the reason for that cyrillic letters are not treated by regexp engine as the part of [:alpha:], [:alnum:], \w etc. classes? Or they never meant to be?

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: timestamp with time zone output incorrect
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Regular expression