{"id":781,"date":"2015-03-11T11:59:34","date_gmt":"2015-03-11T11:59:34","guid":{"rendered":"http:\/\/blog.silverterra.net\/?p=781"},"modified":"2015-03-11T11:59:34","modified_gmt":"2015-03-11T11:59:34","slug":"replace-a-frame","status":"publish","type":"post","link":"https:\/\/blog.silverterra.net\/?p=781","title":{"rendered":"replace a frame"},"content":{"rendered":"<blockquote><p>Goal: remove marker from a text<\/p><\/blockquote>\n<p>The problem is simple. I have a markered text like this:<\/p>\n<pre data-enlighter-language=\"html\" class=\"EnlighterJSRAW\">\r\nthis is &lt;span class=&quot;mark&quot;&gt;mark&lt;\/span&gt;ered\r\n<\/pre>\n<p>and I want to remove the marker structure quickly. The solution with regex back-reference:<\/p>\n<pre data-enlighter-language=\"js\" class=\"EnlighterJSRAW\">\r\n  x = x.replace(\/(&lt;span class=&quot;mark&quot;&gt;([^&lt;]+)&lt;\\\/span&gt;)\/ig, '$2');\r\n<\/pre>\n<p>where<br \/>\n<b>x<\/b> the markered text itself<br \/>\n<span class=\"red\"><b>$1<\/b><\/span> (not used) is the main regex: <span class=\"red\"><b>(&#60;span class=&#8221;mark&#8221;>&#8230;<\\\/span>)<\/b><\/span><br \/>\n<b>$2<\/b> (what we need to keep) is the second regex: <b>([^<]+)<\/b><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Goal: remove marker from a text The problem is simple. I have a markered text like this: and I want to remove the marker structure quickly. The solution with regex back-reference: where x the markered text itself $1 (not used) is the main regex: (&#60;span class=&#8221;mark&#8221;>&#8230;) $2 (what we need to keep) is the second [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-781","post","type-post","status-publish","format-standard","hentry","category-javascript"],"_links":{"self":[{"href":"https:\/\/blog.silverterra.net\/index.php?rest_route=\/wp\/v2\/posts\/781","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.silverterra.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.silverterra.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.silverterra.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.silverterra.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=781"}],"version-history":[{"count":1,"href":"https:\/\/blog.silverterra.net\/index.php?rest_route=\/wp\/v2\/posts\/781\/revisions"}],"predecessor-version":[{"id":782,"href":"https:\/\/blog.silverterra.net\/index.php?rest_route=\/wp\/v2\/posts\/781\/revisions\/782"}],"wp:attachment":[{"href":"https:\/\/blog.silverterra.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=781"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.silverterra.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=781"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.silverterra.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=781"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}