{"id":745,"date":"2008-05-18T14:44:15","date_gmt":"2008-05-18T18:44:15","guid":{"rendered":"http:\/\/blogs.n1zyy.com\/n1zyy\/?p=745"},"modified":"2008-05-18T14:44:15","modified_gmt":"2008-05-18T18:44:15","slug":"vim-tip-delete-all-lines-which","status":"publish","type":"post","link":"https:\/\/blogs.n1zyy.com\/n1zyy\/2008\/05\/18\/vim-tip-delete-all-lines-which\/","title":{"rendered":"vim Tip: Delete all lines which&#8230;."},"content":{"rendered":"<p>I had a copy of \/etc\/hosts.deny that I wanted to format up to extract the hostnames from&#8230; Every other line started with a comment, though, and I wanted to strip those&#8230;<\/p>\n<p><tt>:g\/#\/d <\/tt><\/p>\n<p>Will match all lines (<tt>:g<\/tt>) which <em>contain<\/em> (not necessarily &#8220;start with&#8221;) <tt>#<\/tt> and delete (<tt>d<\/tt>) them.<\/p>","protected":false},"excerpt":{"rendered":"<p>I had a copy of \/etc\/hosts.deny that I wanted to format up to extract the hostnames from&#8230; Every other line started with a comment, though, and I wanted to strip those&#8230; :g\/#\/d Will match all lines (:g) which contain (not &hellip; <a href=\"https:\/\/blogs.n1zyy.com\/n1zyy\/2008\/05\/18\/vim-tip-delete-all-lines-which\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-745","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/745","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/comments?post=745"}],"version-history":[{"count":0,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/745\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/media?parent=745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/categories?post=745"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/tags?post=745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}