Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
Note: In the POSIX standard, a range includes all collation elements between the start and end of the range in the linguistic definition of the current locale. Thus, ranges are linguistic rather than byte value ranges; the semantics of the range expression are independent of the character set. In Oracle Database, the linguistic range is determined by the NLS_SORT initialization parameter.
Connected to Oracle Database 12c Enterprise Edition Release 12.1.0.2.0
SQL> alter session set NLS_SORT=RUSSIAN;
Session altered
SQL> alter session set NLS_COMP=LINGUISTIC;
Session altered
SQL> with ABC as (
2 select column_value as symbol
3 from table(sys.odcivarchar2list('А','Е','Ё','Я','а','е','ё','я'))
4 )
5 select symbol,
6 nlssort(symbol) nls_code_hex
7 from ABC
8 order by symbol;
SYMBOL NLS_CODE_HEX
------ -------------------
А 8C000100
а 8C000200
Е 9A000100
е 9A000200
Ё 9C000100
ё 9C000200
Я E6000100
я E6000200
8 rows selected
SQL> select * from dual where regexp_like('ё', '[а-я]');
DUMMY
-----
X
SQL> select * from dual where regexp_like('ё', '[а-я]', 'i');
DUMMY
-----
X
SQL> select * from dual where regexp_like('ё', '[а-я]', 'c');
DUMMY
-----
SQL>
Регулярные выражения Oracle. Опасный диапазон