On Sat, 26 Oct 2002 01:08:09 +0400 Sergey wrote: > Доброго дня, Karpov. > 25 Октября в 22:42 Вы сказали буквально следующее: > > > >>KOI8 однако, видимо проблема в том, что не подряд идут. > > >> > > >Дык я всегда счтал что грамотно настроенная локаль и должна > > >решать в том числе и проблемы KOI8, с буковками расположенными > > >не подряд. Весь вопрос как это сказать перлу, чтоб при > > >сортировке учитывал установки локали. > > Да, я сразу не подтвердил, сорри. > [а-я] не соответствует действительности. > Проверил на 3-х ALT. > use locale вовсе не use. А если и use, но не locale. Уверен, с KOI8 работать не будет. Непоследовательно идут буквы. С perldoc.com, faq по regex: How can I match a locale-smart version of /[a-zA-Z]/? toc One alphabetic character would be /[^\W\d_]/, no matter what locale you're in. Non-alphabetics would be /[\W\d_]/ (assuming you don't consider an underscore a letter). И еще в подтверждение моей правоты - из man regex: A bracket expression is a list of characters enclosed in `[]'. It nor- mally matches any single character from the list (but see below). If the list begins with `^', it matches any single character (but see below) not from the rest of the list. If two characters in the list are separated by `-', this is shorthand for the full range of charac- ters between those two (inclusive) in the collating sequence, e.g. `[0-9]' in ASCII matches any decimal digit. It is illegal(!) for two ranges to share an endpoint, e.g. `a-c-e'. Ranges are very collating- sequence-dependent, and portable programs should avoid relying on them. То есть пользуйтесь use locale; и \w, как и положено, или задавайте ранг так: [абвгдежзийкл] :) -- С уважением, Балькин Руслан.