[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Newbie regexp question
From: |
kgold |
Subject: |
Re: Newbie regexp question |
Date: |
31 Oct 2002 14:45:36 GMT |
Assuming a newbie doesn't want to start writing elisp ...
I do all sorts of repetitive editing like this using a keyboard macro.
Since they use commands you already know (search, cursor movement,
mark, kill), they're easy to create. And since they execute as
they're being defined, there's less chance for error and debugging
than elisp.
In this case, the macro would be:
isearch-forward-regexp <!--Test-->
beginning-of-line
set-mark-command
isearch-forward-regexp <!--End of Test-->
beginning-of-line
next-line
kill-region
Paul Cohen <paco@enea.se> writes:
>
> 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-->
--
--
Ken Goldman kgold@watson.ibm.com 914-784-7646
- Re: Newbie regexp question, (continued)
- Re: Newbie regexp question, Friedrich Dominicus, 2002/10/30
- 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 <=
RE: Newbie regexp question, Bingham, Jay, 2002/10/30
RE: Newbie regexp question, Bingham, Jay, 2002/10/30
Re: Newbie regexp question, Paul Cohen, 2002/10/31
RE: Newbie regexp question, Bingham, Jay, 2002/10/31