Loading ...
Sorry, an error occurred while loading the content.

135732Re: How to match russian characters (alphabet) with regex

Expand Messages
  • Ben Fritz
    Jan 25 7:57 AM
      On Thursday, January 24, 2013 8:59:27 PM UTC-6, Vlad Irnov wrote:
      > On 1/24/13, Marcin Szamotulski <mszamot@...> wrote:
      >
      > > On 13:43 Thu 24 Jan , av wrote:
      >
      > >> Does someone know how to match russian characters (alphabet) with regex. I
      >
      > >> tried \w but it does match them.
      >
      > >>
      >
      > >> Thanks
      >
      > >>
      >
      > >> --
      >
      > >> --
      >
      > >> You received this message from the "vim_use" maillist.
      >
      > >> Do not top-post! Type your reply below the text you are replying to.
      >
      > >> For more information, visit http://www.vim.org/maillist.php
      >
      > >>
      >
      > >>
      >
      > >
      >
      > > Apparently I haven't found anything better than \S. If you need
      >
      > > something more robust you can always type:
      >
      > > /[αβξ]
      >
      > > (sorry I used Greek symbols since I don't know the Russian ones).
      >
      > > You can input them as digraphs (basically with i_CTRL-K, see :h i_^k,
      >
      > > :h :digraphs).
      >
      > >
      >
      > > Best,
      >
      > > Marcin
      >
      >
      >
      >
      >
      > If Vim 'encoding' is utf-8 or cp1251 you can match Russian alphabet with
      >
      > /[А-я,Ё,ё]
      >

      I'm not sure if it will work with utf-8, but for cp1251 you should be able to modify the 'iskeyword' option to match all the characters you want, then use the \k search item.

      --
      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Show all 5 messages in this topic