TAKAHASHI Tamotsu | 1 Dec 2005 01:59
Picon

Re: special $reply_regexp ?

* Wed Nov 30 2005 Pawel S. Veselov <Pawel.Veselov <at> Sun.COM>
> ^(re|ответ([\\[0-9\\]+])*|aw):[ \t]*
> 
> it only matches the exact case, so I had to add all possible case
> combinations into the regexp
> 
> Couldn't find any special treatment for the reply_regexp RX ...

Maybe mutt_which_case() in pattern.c.

HTH
--

-- 
tamo

Pawel S. Veselov | 1 Dec 2005 18:33
Picon

Re: special $reply_regexp ?

Takashi,

ok, I modified the mutt_which_case() to be:

    int mutt_which_case (const char *s)
    {
      mbstate_t mbstate;
      int len = strlen(s);
      wchar_t wc;

      mbsinit(&mbstate);

      while (len>0)
      {
        int r = mbrtowc(&wc, s, len, &mbstate);
        s+=r; len-=r;
        if (r <= 0 || (isalpha(wc) && isupper(wc))) { 
          return 0; /* case-sensitive */
        }
      }
      return REG_ICASE; /* case-insensitive */
    }

which helped the latin expressions, but now russian expression wouldn't
match any case, as included GNU regex is not i18n'ed, as I understand.
I'll try with Solaris regex, but I remember there were problems with
some regex matching for quotation for example, when I used it last time...

Thanks,
    Pawel.
(Continue reading)


Gmane