﻿{"id":209,"date":"2014-06-19T17:56:03","date_gmt":"2014-06-19T09:56:03","guid":{"rendered":"http:\/\/blog.sway.com.cn\/?p=209"},"modified":"2014-06-19T17:56:03","modified_gmt":"2014-06-19T09:56:03","slug":"%e7%94%a8java%e6%b8%85%e9%99%a4%e5%ad%97%e7%ac%a6%e4%b8%b2%e9%87%8c%e7%9a%84%e6%a0%b7%e5%bc%8f%e6%a0%87%e7%ad%be","status":"publish","type":"post","link":"http:\/\/blog.sway.com.cn\/?p=209","title":{"rendered":"\u7528java\u6e05\u9664\u5b57\u7b26\u4e32\u91cc\u7684\u6837\u5f0f\u6807\u7b7e"},"content":{"rendered":"<p>java \u6e05\u9664 HTML\u6807\u7b7e\u683c\u5f0f\u3001CSS \u6837\u5f0f<\/p>\n<p>JAVA\u4ee3\u7801\u53ef\u4ee5\u8fd9\u6837\u5199:<\/p>\n<div>\n<div>[java]\u00a0<a title=\"view plain\" href=\"http:\/\/blog.csdn.net\/gz530\/article\/details\/7177345#\">view plain<\/a><a title=\"copy\" href=\"http:\/\/blog.csdn.net\/gz530\/article\/details\/7177345#\">copy<\/a><a title=\"print\" href=\"http:\/\/blog.csdn.net\/gz530\/article\/details\/7177345#\">print<\/a><a title=\"?\" href=\"http:\/\/blog.csdn.net\/gz530\/article\/details\/7177345#\">?<\/a><\/div>\n<div>\n<pre class=\"lang:java decode:true \">public static String delTagsFContent(String content){\r\nString strHtml=\"\";\/\/HTML\u6587\u672c\u4ee3\u7801\r\nString strClear=strHtml.replaceAll( \".*?(.*?)&lt;\\\\\/body&gt;\", \"$1\"); \/\/\u8bfb\u51fabody\u5185\u91cc\u6240\u6709\u5185\u5bb9\r\nstrClear=strClear.replaceAll(\"&lt;\/?[^\/?(br)|(p)][^&gt;&lt;]*&gt;\",\"\");\/\/\u4fdd\u7559br\u6807\u7b7e\u548cp\u6807\u7b7e\r\nsystem.out.println(strClear);\/\/\u8f93\u51fa\u7ed3\u679c\r\n}<\/pre>\n<p>\u5982\u679c\u8981\u4fdd\u7559IMG\u6807\u7b7e\u7684\u8bdd\uff0c\u6b63\u5219\u8868\u8fbe\u5f0f\u5c31\u662f\uff1a&lt;\/?[^\/?(img)][^&gt;&lt;]*&gt;<\/p>\n<\/div>\n<\/div>\n<p>\u5982\u679c\u60f3\u4fdd\u7559\u66f4\u591a\u7684\u6807\u7b7e\uff0c\u53ea\u5728\u6b63\u5219\u8868\u8fbe\u5f0f\u6539\u4e00\u4e0b\u5c31\u53ef\u4ee5\u4e86\uff0c &lt;\/?[^\/?(img)|(p)][^&gt;&lt;]*&gt; \u8fd9\u4e2a\u4fdd\u7559(\u8fd9\u91cc\u5199\u7684\u4fdd\u7559\u4e86img,p\u8fd9\u4e24\u4e2a\u6807\u7b7e)\u4f60\u6307\u5b9a\u7684\u6807\u7b7e,\u5176\u4ed6\u7684(\u5305\u62ecfont)\u5168\u53bb\u6389, \u5982\u679c\u4f60\u8fd8\u6709\u5176\u4ed6\u7684\u6807\u7b7e\u60f3\u4fdd\u7559,\u76f4\u63a5\u5728\u91cc\u9762\u52a0\u4e00\u4e2a |(xxx)\u5c31\u884c\u4e86<\/p>\n<p>\u60f3\u53bb\u6389\u6240\u6709\u7684\u6807\u7b7e\u7684\u8bdd\u6b63\u5219\u8868\u8fbe\u5f0f\u4e3a\uff1a&lt;\/?[a-zA-Z]+[^&gt;&lt;]*&gt;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>java \u6e05\u9664 HTML\u6807\u7b7e\u683c\u5f0f\u3001CSS \u6837\u5f0f JAVA\u4ee3\u7801\u53ef\u4ee5\u8fd9\u6837\u5199: [ja &hellip; <a href=\"http:\/\/blog.sway.com.cn\/?p=209\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[93,87,94],"class_list":["post-209","post","type-post","status-publish","format-standard","hentry","category-java","tag-html","tag-java-2","tag-94"],"_links":{"self":[{"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/209","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=209"}],"version-history":[{"count":1,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/209\/revisions"}],"predecessor-version":[{"id":210,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/209\/revisions\/210"}],"wp:attachment":[{"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=209"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}