{"id":150,"date":"2020-03-17T07:04:00","date_gmt":"2020-03-17T07:04:00","guid":{"rendered":"https:\/\/molecularsciences.org\/content\/?p=150"},"modified":"2020-12-02T07:06:02","modified_gmt":"2020-12-02T07:06:02","slug":"java-removing-enclosing-quotes","status":"publish","type":"post","link":"https:\/\/molecularsciences.org\/content\/java-removing-enclosing-quotes\/","title":{"rendered":"Java: removing enclosing quotes"},"content":{"rendered":"\n<p>The following code would remove enclosing quotes from Java Strings<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>s = s.replaceAll(\"(^\\\")|(\\\"$)\",\"\");<\/code><\/pre>\n\n\n\n<p>With this regular expression, if Java sees an opening double quote (^\\&#8221;) or | a closing double quote (\\&#8221;$) then it replaces them with nothing &#8220;&#8221;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following code would remove enclosing quotes from Java Strings With this regular expression, if Java sees an opening double quote (^\\&#8221;) or | a closing double quote (\\&#8221;$) then it replaces them with nothing &#8220;&#8221;.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[38],"class_list":["post-150","post","type-post","status-publish","format-standard","hentry","category-java","tag-java"],"_links":{"self":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/150","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/comments?post=150"}],"version-history":[{"count":1,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/150\/revisions"}],"predecessor-version":[{"id":151,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/150\/revisions\/151"}],"wp:attachment":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/media?parent=150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/categories?post=150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/tags?post=150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}