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

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

Re: Newbie regexp question


From: Friedrich Dominicus
Subject: Re: Newbie regexp question
Date: 30 Oct 2002 16:33:43 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)

Paul Cohen <paco@enea.se> writes:

> Hi
> 
> I want to do a Emacs regexp search and replace on a HTML file containing
> patterns like this:
> 
> <!--Test-->
> ...
> <!--End of Test-->
> 
> Where "..." denotes a variable number of lines of HTML text.
> 
> I want to search for all occurrences of the above pattern and then
> remove them from the HTML file!
> 
> I've tried a number of variants without any success. For example the
> following regexp doesn't work:
> 
> <!--Test-->\(.*\n\)*<!--End of Test-->
I would restate the problem. It does not make much sense to me to
match over a bunch of lines you do not want to handle. 

So how about
M-C-% ^[ \t]*<!--.*Test.*--> with: RET

Or even better if you kow exactly what you are looking for
using replace-string?

Regards
Friedrich


reply via email to

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