[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 <mailman.1464.1065762573.21628.bug-gnu-emacs@gnu.org>,
Dan Jacobson <jidanni@jidanni.org> 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, barry.margolin@level3.com
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.