* Regex search and replace End Of line
@ 2003-08-30 17:32 Herb Martin
2003-08-30 18:10 ` Johan Bockgård
0 siblings, 1 reply; 3+ messages in thread
From: Herb Martin @ 2003-08-30 17:32 UTC (permalink / raw)
I know this must be easy but have yet to find it in
help:
Goal: Search for pattern at end of line and remove the
pattern INCLUDING the line termination.
(Tried using several of the replace-regex functions
unsuccessfully.)
example--------------------------------------------------------
test text etc test text =
some stuff
test text etc test text =
some stuff
test text etc test text =
some stuff
-------------------result---------------------------------------
test text etc test text some stuff
test text etc test text some stuff
test text etc test text some stuff
----------------------------------------------------------------
FYI, it was mangled by email encoding.
--
Herb Martin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Regex search and replace End Of line
2003-08-30 17:32 Regex search and replace End Of line Herb Martin
@ 2003-08-30 18:10 ` Johan Bockgård
2003-08-30 19:23 ` Herb Martin
0 siblings, 1 reply; 3+ messages in thread
From: Johan Bockgård @ 2003-08-30 18:10 UTC (permalink / raw)
"Herb Martin" <news@LearnQuick.com> writes:
> Goal: Search for pattern at end of line and remove the
> pattern INCLUDING the line termination.
>
> example--------------------------------------------------------
> test text etc test text =
> some stuff
> test text etc test text =
> some stuff
> test text etc test text =
> some stuff
C-q is your friend:
M-% = C-q C-j RET RET
> -------------------result---------------------------------------
> test text etc test text some stuff
> test text etc test text some stuff
> test text etc test text some stuff
> ----------------------------------------------------------------
--
Johan Bockgård
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Regex search and replace End Of line
2003-08-30 18:10 ` Johan Bockgård
@ 2003-08-30 19:23 ` Herb Martin
0 siblings, 0 replies; 3+ messages in thread
From: Herb Martin @ 2003-08-30 19:23 UTC (permalink / raw)
> C-q is your friend:
>
> M-% = C-q C-j RET RET
Thanks -- I was a little uncertain about the "C-j" since this is
a Windows System and I thought it might be "C-m C-j" but
JUST the "C-j" worked fine.
Seems Emacs -- likes Perl -- on Windows does the "right thing"
with EOL.
Oddly enough I am having trouble with C-M-% (there is special
processing on Windows for Alt which I am suspecting) -- if I
just hit, Ctrl-Alt-Shift for "%" it does nothing -- but if I hit
Ctrl-Alt-5, hold the shifting keys (Ctrl-Alt) and add Shift-%
it works.
Doesn't seem to matter what order I depress the shifting keys
(nor trying to depress them all simultaneously.)
There is probably a simpler method, or fix but it works for now.
--
Thanks,
Herb Martin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-08-30 19:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-30 17:32 Regex search and replace End Of line Herb Martin
2003-08-30 18:10 ` Johan Bockgård
2003-08-30 19:23 ` Herb Martin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).