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 } }
https://amoxil.icu/# can i buy amoxicillin over the counter
https://amoxil.icu/# how to get amoxicillin over the counter
http://ciprofloxacin.life/# buy cipro
can i purchase generic clomid online: cost of generic clomid – where to buy cheap clomid
https://ciprofloxacin.life/# cipro 500mg best prices
http://ciprofloxacin.life/# ciprofloxacin 500mg buy online
can you buy generic clomid without prescription: how to get cheap clomid without insurance – how to get cheap clomid tablets
https://amoxil.icu/# amoxicillin in india
antibiotics cipro: buy ciprofloxacin over the counter – ciprofloxacin generic
https://clomid.site/# can i order generic clomid pill
price of amoxicillin without insurance: amoxicillin for sale online – how to get amoxicillin over the counter
amoxacillian without a percription amoxicillin 50 mg tablets amoxicillin cephalexin
amoxicillin buy canada generic amoxicillin online amoxicillin 500 mg without prescription
amoxicillin buy no prescription: amoxicillin 500 mg online – where can i buy amoxicillin over the counter uk
https://clomid.site/# how to get generic clomid pill
paxlovid covid paxlovid india buy paxlovid online
prednisone in uk: prednisone cost 10mg – cortisol prednisone
buy amoxicillin: cost of amoxicillin 875 mg – buy amoxicillin 500mg
where to get generic clomid price how to buy clomid clomid online
where can i buy amoxicillin online: amoxicillin from canada – buy amoxicillin online with paypal
http://amoxil.icu/# amoxil pharmacy
Paxlovid buy online: paxlovid india – paxlovid buy
where to buy amoxicillin 500mg: amoxicillin 500 mg brand name – amoxicillin 500 mg without a prescription
get clomid: where buy clomid for sale – where to get generic clomid online
paxlovid buy paxlovid india paxlovid pill
cost of generic clomid pill: order cheap clomid – can you buy cheap clomid now
can i order generic clomid: buy cheap clomid prices – clomid rx
http://clomid.site/# get generic clomid
buy amoxicillin 500mg canada: amoxicillin order online – over the counter amoxicillin canada
http://ciprofloxacin.life/# cipro ciprofloxacin