[PLUG] Emacs Replace At End of Line
Randal L. Schwartz
merlyn at stonehenge.com
Thu Mar 13 15:26:36 UTC 2008
>>>>> "Rich" == Rich Shepard <rshepard at appl-ecosys.com> writes:
Rich> I'm trying to replace a '\n' with '),\n', but haven't figured out the
Rich> proper syntax. The search is specified with \$, but if I specify the
Rich> replacement as ),\$ the editor wants to keep adding '),' to the end of the
Rich> same line.
M-x query-replace RET (invoke query-replace)
^Q RET RET (escape the return with control Q, set search string)
) , ^Q RET RET (escape the replacement return with control Q, replace string)
hit "y" a few times to verify that it's doing the right thing, then hit "!"
to do the rest.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
More information about the PLUG
mailing list