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

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

RE: RegExp question


From: JayBingham
Subject: RE: RegExp question
Date: Thu, 23 Sep 2004 15:23:08 -0500
User-agent: Internet Messaging Program (IMP) 3.2.2

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.

<Do not reply to the above address, reply only to the list>

-_
J_)
C_)ingham
.    Hewlett-Packard
.    Austin, TX
. “Language is the apparel in which your thoughts parade in public.
.  Never clothe them in vulgar and shoddy attire.”     -Dr. George W.
Crane-




reply via email to

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