emacs-devel
[Top][All Lists]
Advanced

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

Re: regexp case sensitivity bug


From: Andreas Schwab
Subject: Re: regexp case sensitivity bug
Date: Tue, 10 Dec 2002 11:52:12 +0100
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.3.50 (ia64-suse-linux)

address@hidden (Kim F. Storm) writes:

|> Or we can use a completely different approach:
|> 
|> (defun isearch-no-upper-case-p (string regexp-flag)
|>   "..."
|>   (let ((case-fold-search nil))
|>     (save-match-data
|>       (null (string-match 
|>               (if regexp-flag "\\(^\\|[^\\]\\)[[:upper:]]" "[[:upper:]]")
|>               string)))))

That needs to check whether there is an even number of \ before the
letter, because only then the letter is not part of a special regex
matcher.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 N├╝rnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



reply via email to

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