From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.bugs Subject: Re: occur "^[^#]" gets next line too Date: Fri, 10 Oct 2003 16:04:02 GMT Organization: Level(3) Communications, Woburn, MA Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <87r81nzc7j.fsf@jidanni.org> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1065802563 20415 80.91.224.253 (10 Oct 2003 16:16:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 10 Oct 2003 16:16:03 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 10 18:16:01 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A7zvt-0000W2-00 for ; Fri, 10 Oct 2003 18:16:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A7zvU-0004GX-69 for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Oct 2003 12:15:36 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1A7zvQ-0004Fs-Pt for bug-gnu-emacs@prep.ai.mit.edu; Fri, 10 Oct 2003 12:15:32 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1A7zuu-00049X-SD for bug-gnu-emacs@prep.ai.mit.edu; Fri, 10 Oct 2003 12:15:31 -0400 Original-Received: from [132.239.1.58] (helo=mailbox6.ucsd.edu) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1A7zuN-0003vw-Mo for bug-gnu-emacs@prep.ai.mit.edu; Fri, 10 Oct 2003 12:14:27 -0400 Original-Received: from cc26-01.idc1.level3.com (machine77.Level3.com [209.244.4.106]) by mailbox6.ucsd.edu (8.12.10/8.12.3) with ESMTP id h9AGE8iW049010 for ; Fri, 10 Oct 2003 09:14:08 -0700 (PDT) Original-Received: from cc26-01.idc1.level3.com (localhost [127.0.0.1]) by localhost.level3.com (Postfix) with ESMTP id D8CDBBF635 for ; Fri, 10 Oct 2003 16:04:03 +0000 (GMT) Original-Received: from f10211-05.adc1.level3.com (mailmgmt.l3.com [10.1.24.134]) by cc26-01.idc1.level3.com (Postfix) with ESMTP id 5E557BF621 for ; Fri, 10 Oct 2003 16:04:03 +0000 (GMT) Original-Received: by f10211-05.adc1.level3.com (8.11.6+Sun/8.11.6) id h9AG42C22416; Fri, 10 Oct 2003 16:04:02 GMT X-Authentication-Warning: f10211-05.adc1.level3.com: news set sender to planet-newscrap using -f Original-To: gnu-emacs-bug@moderators.isc.org Original-Path: 53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.bug Mail-Copies-To: never X-Newsreader: trn 4.0-test72 (19 April 1999) Originator: barmar@genuity.net (Barry Margolin) Original-Lines: 18 Original-NNTP-Posting-Host: 171.78.176.30 Original-X-Trace: news.level3.com 1065801842 171.78.176.30 (Fri, 10 Oct 2003 16:04:02 GMT) Original-NNTP-Posting-Date: Fri, 10 Oct 2003 16:04:02 GMT X-Spamscanner: mailbox6.ucsd.edu (v1.2 Sep 26 2003 11:14:44, 0.0/5.0 2.60) X-MailScanner: PASSED (v1.2.8 17855 h9AGE8iW049010 mailbox6.ucsd.edu) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:5956 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:5956 In article , Dan Jacobson 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.