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 } }
amoxicillin azithromycin: how to buy amoxycillin – amoxicillin generic brand
http://amoxildelivery.pro/# generic amoxicillin online
Getting A Personal Loan With Even The Most Horrible Credit 다바오 홀덤 다운로드
Rushmore Casino Review 슬롯
Seo A Budget And Smart Way 검색엔진최적화 대행사
http://amoxildelivery.pro/# where can i buy amoxicillin over the counter uk
Good site you have got here.. It’s difficult to find good quality writing like yours nowadays. I honestly appreciate individuals like you! Take care!!
How November 23 Playing Roulette – Bribe The Dealer 쥬라기월드 에볼루션 2
can i buy cheap clomid for sale: buying generic clomid without prescription – can i order clomid pills
buy amoxil: amoxicillin 500mg tablets price in india – amoxicillin 500 mg tablet
http://paxloviddelivery.pro/# paxlovid pill
http://paxloviddelivery.pro/# paxlovid pharmacy
Having read this I thought it was rather enlightening. I appreciate you finding the time and energy to put this article together. I once again find myself spending a lot of time both reading and commenting. But so what, it was still worth it!
http://ciprodelivery.pro/# buy cipro online
doxycycline 100mg cap: doxycycline 100mg cost in india – average cost for doxycycline
Your insights are always on point.구글 백링크
http://ciprodelivery.pro/# buy generic ciprofloxacin
Oh my goodness! Impressive article dude! Thank you, However I am encountering difficulties with your RSS. I don’t know the reason why I can’t subscribe to it. Is there anybody having the same RSS problems? Anybody who knows the answer can you kindly respond? Thanx!!
https://amoxildelivery.pro/# cheap amoxicillin 500mg
doxycycline south africa: drug doxycycline 100mg – doxycycline for sale uk
order clomid: buy generic clomid without insurance – get cheap clomid no prescription
https://paxloviddelivery.pro/# Paxlovid over the counter
http://foruspharma.com/# mexican mail order pharmacies
best canadian pharmacy online: canadian pharmacy review – canadian pharmacy king reviews
medicine in mexico pharmacies: buying prescription drugs in mexico online – medication from mexico pharmacy
india pharmacy mail order: п»їlegitimate online pharmacies india – indian pharmacy paypal
canada drug pharmacy: canadian pharmacy meds – best canadian pharmacy online
buy drugs from canada: canadian pharmacies that deliver to the us – canadian pharmacy store
mexico pharmacies prescription drugs: pharmacies in mexico that ship to usa – buying prescription drugs in mexico online
I’ve bookmarked this for future reference.검색엔진최적화 회사