[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Occur buglet
From: |
era |
Subject: |
Re: Occur buglet |
Date: |
10 Mar 2004 10:27:29 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
On Fri, 05 Mar 2004 14:50:50 -0500, Morten Welinder <terra@gnu.org>
posted to bug-gnu-emacs:
> 1 line matching "^[+][^+]" in buffer *scratch*.
> 2:+
> : hi
> It is debatable whether there should be a match -- grep would not have
> found it -- but the listed thing is not one line, but two.
The string which matches [^+] is the newline of line 2. Emacs regex
negated classes will include newline unless you explicitly exclude it.
The regex [^+\n] matches what you'd express as [^+] in grep. Since
grep is line-oriented, but Emacs is buffer-oriented, this distinction
makes sense.
Furthermore, there is nowhere any assertion that occur and grep should
match exactly the same things -- there are numerous other differences,
all of which are hopefully adequately documented.
/* era */
--
The email address era the contact information Just for kicks, imagine
at iki dot fi is heavily link on my home page at what it's like to get
spam filtered. If you <http://www.iki.fi/era/> 500 pieces of spam for
want to reach me, see instead. each wanted message.