From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: JayBingham Newsgroups: gmane.emacs.help Subject: RE: RegExp question Date: Thu, 23 Sep 2004 15:23:08 -0500 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <1095970988.415330ac9b789@www.bluebottle.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1095971055 28442 80.91.229.6 (23 Sep 2004 20:24:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 23 Sep 2004 20:24:15 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 23 22:24:03 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CAa8I-0008NQ-00 for ; Thu, 23 Sep 2004 22:24:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CAaEK-0004yN-Rf for geh-help-gnu-emacs@m.gmane.org; Thu, 23 Sep 2004 16:30:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CAaE6-0004x2-6O for help-gnu-emacs@gnu.org; Thu, 23 Sep 2004 16:30:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CAaE3-0004vz-Fn for help-gnu-emacs@gnu.org; Thu, 23 Sep 2004 16:30:00 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CAaE3-0004vT-2e for help-gnu-emacs@gnu.org; Thu, 23 Sep 2004 16:29:59 -0400 Original-Received: from [67.107.78.242] (helo=bluebottle-fe0.bluebottle.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CAa7S-0005Go-UZ for help-gnu-emacs@gnu.org; Thu, 23 Sep 2004 16:23:11 -0400 Original-Received: from localhost (localhost [127.0.0.1]) (authenticated bits=0) by bluebottle-fe0.bluebottle.com (8.12.11/8.12.11) with ESMTP id i8NKN87E003755 for ; Thu, 23 Sep 2004 15:23:09 -0500 Original-Received: from inecce-pxy03.zcce.compaq.com (inecce-pxy03.zcce.compaq.com [161.114.1.183]) by www.bluebottle.com (IMP) with HTTP for ; Thu, 23 Sep 2004 15:23:08 -0500 Original-To: help-gnu-emacs@gnu.org User-Agent: Internet Messaging Program (IMP) 3.2.2 X-MIME-Autoconverted: from 8bit to quoted-printable by bluebottle-fe0.bluebottle.com id i8NKN87E003755 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:20839 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:20839 On Thursday, September 23, 2004 11:42 AM Ryan Bowman wrote: > So I changed it to this "repeat\\(-[xy]?\\)?[^:]" > so it won't match background-repeat: but then it no > longer matches repeat, > I assume because [^:] actually means to match > something, but not a ':' > so how do I specifiy that I don't care if anything > follows the patter or not, > so long as it is NOT ':'? I am curious which version of emacs you are running. I have emacs 21.2 loaded on my Windows 2k system and the above regexp matches every repeat in your message except those followed by a ":" and one that I added at the end of the buffer which does not have anything following it. You are correct in your assumption that [^:] actually means to match something. Remember that a new line is something, as opposed to nothing. This means that when repeat occurs at the end of a line the new line is included in the matched string and point will follow it (be at the start of the next line) so it may appear that it was not matched. -_ J_) C_)ingham . Hewlett-Packard . Austin, TX . =93Language is the apparel in which your thoughts parade in public. . Never clothe them in vulgar and shoddy attire.=94 -Dr. George W. Crane-