[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: regex and case-fold-search problem
From: |
Stefan Monnier |
Subject: |
Re: regex and case-fold-search problem |
Date: |
Thu, 29 Aug 2002 12:00:23 -0400 |
> 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.
Two things:
- Neither `upper(lower(x)) = x' nor `lower(upper(x)) = x' are guaranteed.
- The regexp matcher right now only has access to one of the two tables
(I believe it's the `lower' but I'm not even sure) and so two chars
are deemed to match if translate(a) = translate(b).
The first might be a non-issue, I don't know.
The second is more serious because that means that if we want to use
`upper' we'll need to somehow pass that table as well, which requires
changing the interface to the reg-matching functions.
Stefan
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, 2002/08/29
- Re: regex and case-fold-search problem,
Stefan Monnier <=
- 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