{"id":3287,"date":"2021-11-03T12:07:39","date_gmt":"2021-11-03T12:07:39","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=3287"},"modified":"2021-11-03T12:08:45","modified_gmt":"2021-11-03T12:08:45","slug":"batch-file-to-delete-specific-words-in-txt","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/batch-file-to-delete-specific-words-in-txt\/20825.html","title":{"rendered":"Batch File To Delete Specific Words In Txt"},"content":{"rendered":"<p>Example, I have a text file and the contents are:<\/p>\n<p>Dog Cat Horse 3456<br \/>\nHorse Dog Mouse 1234<br \/>\nBird Cat Dog 4567<br \/>\nDog Mouse Bird 1112<br \/>\nHorse Cow Fly 22234<br \/>\nCow Dog Mouse 54444<br \/>\nCow Fly Mouse 2323222<\/p>\n<p>How do I write a batch file that will remove any line that has &#8220;Dog Mouse&#8221; and &#8220;Cow Fly&#8221; but it has to be exact match so I don&#8217;t want it to remove a line that might have &#8220;Dog&#8221; in it somewhere or &#8220;Cow&#8221; in it somewhere, etc.<\/p>\n<p>I was able to use the Find command to delete specific single words but not the exact match of two words or more as they are placed in the sentence (e.g. &#8220;Dog Mouse&#8221;)<\/p>\n<p>Hope that makes sense.<\/p>\n<p>Thanks!!!<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":8},"question-category":[55],"question_tags":[],"class_list":["post-3287","question","type-question","status-publish","hentry","question-category-programming"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/3287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=3287"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=3287"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=3287"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=3287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}