How do I search and copy in emacs? -
this question has answer here:
- emacs copy matching lines 5 answers
my text follows format:
header hello ... ... header neighbour ... ... ... header test1 header test2
i want select instances of header*\n
, copy them new document. so, result like:
header hello header neighbour header test1 header test2
it doesn't matter if spaces preserved. possible standard emacs functionality?
it might easier copy whole document new document, , use delete-non-matching-lines
.
m-x delete-non-matching-lines<ret> ^header<ret>
Comments
Post a Comment