[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
- Newbie regexp question, Paul Cohen, 2002/10/30
- Re: Newbie regexp question,
Friedrich Dominicus <=
- Re: Newbie regexp question, Paul Cohen, 2002/10/30
- Re: Newbie regexp question, Friedrich Dominicus, 2002/10/30
- Re: Newbie regexp question, Michael Slass, 2002/10/30
- Re: Newbie regexp question, Friedrich Dominicus, 2002/10/30
- Re: Newbie regexp question, Michael Slass, 2002/10/30
- Re: Newbie regexp question, Michael Slass, 2002/10/30
Re: Newbie regexp question, Barry Margolin, 2002/10/30
Re: Newbie regexp question, Stefan Monnier <address@hidden>, 2002/10/30
Re: Newbie regexp question, kgold, 2002/10/31