bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: occur "^[^#]" gets next line too


From: Barry Margolin
Subject: Re: occur "^[^#]" gets next line too
Date: Fri, 10 Oct 2003 16:04:02 GMT

In article <address@hidden>,
Dan Jacobson  <address@hidden> wrote:
>Andreas> [^#] matches a newline.  If you don't want that fix your regex.
>
>There is no # mentioned in Syntax of Regular Expressions Info page of
>Emacs Info.

[^#] matches any character that isn't '#'.  Newline isn't '#', so it
matches it.

If you want to match any character that isn't '#' or newline, use "[^#\n]"
in Lisp code, or [^#C-qC-j] when entering a regexp interactively.

-- 
Barry Margolin, address@hidden
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.




reply via email to

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