Java + JS去除網頁HTML標籤
同樣是工作上用到,在前(Javascript)、後端(Java、JSP)同樣都有的一個需求,就是必須將讀入的字串去除HTML Tag,以下是兩個範例:
var HTML = ""; HTML+= "<p>HTML P Tag String</p>"; HTML+= "<p><a href='/test/link.html'>HTML A Tag String</a></p>"; var htmlTagPattern = /<{1}[^>]{1,}>{1}/g; //HTML Tag Pattern var htmlSplit = HTML.replace(htmlTagPattern, ""); //移除HTML Tag console.log("htmlSplit : " , htmlSplit); //輸出htmlSplit : HTML P Tag StringHTML A Tag String
package CDIT.stanley; public class trimHTML { public static void main(String[] args) { String HTML = ""; HTML+= "<p>HTML P Tag String</p>"; HTML+= "<p><a href='/test/link.html'>HTML A Tag String</a></p>"; String htmlTagPattern = "<{1}[^>]{1,}>{1}"; //HTML Tag Pattern String htmlSplit = HTML.replaceAll(htmlTagPattern, ""); //移除HTML Tag System.out.println("htmlSplit : " + htmlSplit); //輸出htmlSplit : HTML P Tag StringHTML A Tag String } }
how does tamoxifen work: who should take tamoxifen – hysterectomy after breast cancer tamoxifen
http://cytotec.club/# purchase cytotec
http://cytotec.club/# buy cytotec online
http://finasteride.store/# buy propecia now
ciprofloxacin generic price antibiotics cipro ciprofloxacin 500mg buy online
https://ciprofloxacin.tech/# buy cipro online canada
http://ciprofloxacin.tech/# cipro 500mg best prices
cost cheap propecia without prescription: order cheap propecia without insurance – buy generic propecia no prescription
ciprofloxacin order online cipro online no prescription in the usa buy cipro online without prescription
cost propecia prices: get cheap propecia without insurance – buy propecia without rx
https://cytotec.club/# buy cytotec pills
buy cytotec pills: buy cytotec online – cytotec buy online usa
lisinopril 10 mg price lisinopril 5 mg buy order cheap lisinopril
buy cytotec over the counter п»їcytotec pills online buy cytotec over the counter
http://cytotec.club/# buy cytotec pills
https://cytotec.club/# buy cytotec online fast delivery
zestril 40 zestril 20 mg prinivil 10 mg
https://nolvadex.life/# tamoxifen rash
ciprofloxacin 500 mg tablet price: buy cipro – buy cipro online
http://nolvadex.life/# aromatase inhibitor tamoxifen
where can i purchase lisinopril: lisinopril online prescription – lisinopril 1.25
Misoprostol 200 mg buy online п»їcytotec pills online cytotec online
cytotec pills buy online: buy cytotec online – buy cytotec over the counter
http://nolvadex.life/# tamoxifen benefits
https://finasteride.store/# get propecia tablets
buy cytotec pills online cheap buy cytotec over the counter buy cytotec pills online cheap
https://nolvadex.life/# natural alternatives to tamoxifen
tamoxifen rash: buy nolvadex online – cost of tamoxifen
https://finasteride.store/# generic propecia price
order cytotec online: buy cytotec pills online cheap – buy cytotec online fast delivery