Mark Plaskin wrote:
Put this in the *scatch* buffer:
a1
b
c1
d
e1
f
g1
h
i1
j
k1
l
m1
n
Go to the top of the buffer and type M-x occur RET [^a-z]$ RET
You'll get this:
8 matches for "[^a-z]$" in buffer: *scratch*
1:a1
3:c1
5:e1
7:g1
9:i1
11:k1
13:m1
14:n
But line 14 doesn't match the regexp, does it?
I assume that you have a newline after the n, followed by a completely
empty line. Then line 14 _does_ match. You have a newline, which
matches [^a-z], followed by an end of line. Elisp regexps behave
differently in this respect from grep regexps.
>From `(elisp)Regexp Special':
A complemented character alternative can match a newline, unless
newline is mentioned as one of the characters not to match. This
is in contrast to the handling of regexps in programs such as
`grep'.
Sincerely,
Luc.
_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug