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

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

FW: Help with Emacs Regex


From: Hortman, Mark
Subject: FW: Help with Emacs Regex
Date: Fri, 18 Jul 2003 15:17:40 -0500

What I am trying to do.....

I have a file that I am expecting to be in a certain CSV format.  The way it
comes in to me is sometimes flawed with accidentally wrapped text lines.  So
I have been writing macros to search for lines that don't match the format I
am expecting, and then I go to the previous line and kill the end of line in
order to wrap the next line into the right place.

I was previously given a barf bag and the regex of
^\([^"]\|.[^0-9]\|..[^0-9]\|...[^0-9]\)

and that seems to pass all of my tests so far.  

-----Original Message-----
From: kai.grossjohann@gmx.net [mailto:kai.grossjohann@gmx.net]
Sent: Friday, July 18, 2003 2:41 PM
To: help-gnu-emacs@gnu.org
Subject: Re: Help with Emacs Regex


"Hortman, Mark" <markh@JohnsAuto.com> writes:

> I need to match lines that do not begin with " and three numbers, so

Do not use a regexp for this.  Instead, use some other kind of
feature that allows negation.  For example, Emacs has the flush-lines
command, but it also has the complementary keep-lines.

What do you want to do?  Then we can help and point you to the right
feature you need.

(It is possible to define a regexp that does what you want, but it
will make your head swim.  Details provided on request, if you prove
that you have a good and solid seat and a barf bag.)
-- 
~/.signature
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs




reply via email to

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