- AuthorPosts
- April 7, 2007 at 6:23 am #4290reginaldParticipant
Hi,
first I want to say that EmEditor is a great tool.
There is one question I want to ask.Is there a way to cut whole lines that contain a specified phrase and paste them to a new file?
Let me explain a bit. For example there is a file that contains the following lines:
test-AB-test
test-AA-test
test-AA1-test
test-AC-test
test-AA2-test
test-AD-testI search for “AA” and EmEditor cut these lines and generates a new file with the lines:
test-AA-test
test-AA1-test
test-AA2-testThe original file now contains only these lines without “AA”:
test-AB-test
test-AC-test
test-AD-testThe new generated file with the “AA”-lines can be saved with a new name.
I tried several ways with “regular expressions” or “search and replace” but I couldn´t find out how the whole lines are cut out of the original file.
Any help available?
Thanks a lot in advance for support.April 10, 2007 at 5:00 pm #4295Yutaka EmuraKeymasterI wrote similar macros before:
Macro that extracts lines that contain the specified string
http://www.emeditor.com/modules/mydownloads/singlefile.php?cid=8&lid=169Macro that extracts lines that do not contain the specified string
http://www.emeditor.com/modules/mydownloads/singlefile.php?cid=8&lid=170You can run these macros, or you can combine these macros and run once.
April 11, 2007 at 7:12 am #4296reginaldParticipantThanks a lot, Yatuka, that combination of macros works… :lol:
- AuthorPosts
- You must be logged in to reply to this topic.