{"id":351,"date":"2013-09-30T16:38:25","date_gmt":"2013-09-30T20:38:25","guid":{"rendered":"\/blog\/?p=351"},"modified":"2015-05-21T10:12:34","modified_gmt":"2015-05-21T14:12:34","slug":"sed-is-great-but-not-that-great","status":"publish","type":"post","link":"https:\/\/www.devolve.local\/sed-is-great-but-not-that-great\/","title":{"rendered":"sed is great, but not that great"},"content":{"rendered":"

TIL: http:\/\/stackoverflow.com\/questions\/1103149\/non-greedy-regex-matching-in-sed<\/p>\n

It turns out, sed<\/code> has no concept of a non-greedy match. You have to use perl<\/code> or some other advanced tool to get that regex feature. The workaround given at Stack Overflow only works if you have a single character ending match delimiter (in this case, it was [^\/]+<\/code> to match until the next forward slash).<\/p>\n","protected":false},"excerpt":{"rendered":"

TIL: http:\/\/stackoverflow.com\/questions\/1103149\/non-greedy-regex-matching-in-sed It turns out, sed has no concept of a non-greedy match. You have to use perl or some other advanced tool to get that regex feature. The workaround given at Stack Overflow only works if you have a single character ending match delimiter (in this case, it was [^\/]+ to match until the […]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[34,41],"_links":{"self":[{"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/posts\/351"}],"collection":[{"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/comments?post=351"}],"version-history":[{"count":1,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/posts\/351\/revisions"}],"predecessor-version":[{"id":352,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/posts\/351\/revisions\/352"}],"wp:attachment":[{"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/media?parent=351"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/categories?post=351"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devolve.local\/wp-json\/wp\/v2\/tags?post=351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}