emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: regex and case-fold-search problem


From: Kenichi Handa
Subject: Re: regex and case-fold-search problem
Date: Sat, 24 Aug 2002 09:51:46 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.1.30 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <address@hidden>, "Eli Zaretskii" <address@hidden> writes:
>>  (let ((case-fold-search nil))
>>    (string-match "[A-_]" "A")) => 0
>>  (let ((case-fold-search t))
>>    (string-match "[A-_]" "A")) => nil
>>  (let ((case-fold-search t))
>>    (string-match "[A_]" "A")) => 0

> Does that happen because under case-fold-search non-nil the
> characters on the range specification are downcased?

Yes.

>>  In my opinion, specifying ranges by chars are nonsense
>>  because there should be no semantics in the order of
>>  characters codes.

> Sorry, I don't understand: how would one specify a range _except_
> with two characters and a dash between them?  What am I missing?

I mean that the concept of character range itself is not
good.  A character code is just an identifier of a
character.  We usually don't think about "a range of
identifiers" (e.g. "symbols in the range between t and nil"
is nonsense).

---
Ken'ichi HANDA
address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]