[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: regex and case-fold-search problem
From: |
Kim F. Storm |
Subject: |
Re: regex and case-fold-search problem |
Date: |
29 Aug 2002 17:00:16 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
Kenichi Handa <address@hidden> writes:
> In article <address@hidden>, address@hidden (Kim F. Storm) writes:
> > IMO, it is wrong to handle case-fold-search for regexp ranges by
> > trying to modify the interpretation of the regex range.
>
> > Instead, the regex matcher should try to upcase and lowercase each
> > character in the string and see if either of these caracters are
> > within the given range.
>
> I also reached to that idea. It makes regexp compiling
> simpler and faster but makes regexp matching a little bit
> slower. I don't know if that slowerness is tolerable or
> not, but it's worth trying.
Maybe it can be semi-optimized for a char C as follows:
MATCH = (C in range) ||
(UC = uppercase(C)) != C ? (UC in range) : (lowercase(C) in range))
--
Kim F. Storm <address@hidden> http://www.cua.dk
- Re: regex and case-fold-search problem, (continued)
- Re: regex and case-fold-search problem, Richard Stallman, 2002/08/26
- Re: regex and case-fold-search problem, Kenichi Handa, 2002/08/29
- Re: regex and case-fold-search problem, Kim F. Storm, 2002/08/29
- Re: regex and case-fold-search problem, Kenichi Handa, 2002/08/29
- Re: regex and case-fold-search problem,
Kim F. Storm <=
- Re: regex and case-fold-search problem, Stefan Monnier, 2002/08/29
- Re: regex and case-fold-search problem, Kenichi Handa, 2002/08/29
- Re: regex and case-fold-search problem, Richard Stallman, 2002/08/30
- Re: regex and case-fold-search problem, Richard Stallman, 2002/08/30
- Re: regex and case-fold-search problem, Stefan Monnier, 2002/08/30
- Re: regex and case-fold-search problem, Eli Zaretskii, 2002/08/31