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 To Safeguard Yourself From Bank Failures – To Be Able To Ask Your
Banker 다바오 흡연 가능 호텔
http://paxloviddelivery.pro/# paxlovid covid
Everything is very open with a very clear clarification of the challenges. It was really informative. Your site is useful. Thank you for sharing.
Quick Unsecured Bank Loans – Quick And Simple 비상금 대출
where to get clomid: cost of clomid pills – buy generic clomid pill
amoxicillin discount coupon: amoxicillin 500 mg online – amoxil generic
https://doxycyclinedelivery.pro/# doxycycline india price
https://clomiddelivery.pro/# can you get clomid without a prescription
https://paxloviddelivery.pro/# paxlovid pill
Hello! I could have sworn I’ve visited this blog before but after browsing through many of the posts I realized it’s new to me. Anyhow, I’m certainly pleased I discovered it and I’ll be book-marking it and checking back often!
Paxlovid over the counter: Paxlovid buy online – Paxlovid buy online
https://amoxildelivery.pro/# where can you get amoxicillin
An impressive share! I have just forwarded this onto a friend who had been doing a little research on this. And he actually ordered me lunch simply because I discovered it for him… lol. So allow me to reword this…. Thank YOU for the meal!! But yeah, thanks for spending the time to discuss this topic here on your website.
Advantages Connected With A Bank Owned Foreclosed Property 다바오 포커 아이폰 다운로드
http://amoxildelivery.pro/# amoxicillin 500mg no prescription
https://clomiddelivery.pro/# cheap clomid without dr prescription
how to buy generic clomid no prescription: how to get generic clomid tablets – clomid price
Spot on with this write-up, I truly think this amazing site needs much more attention. I’ll probably be returning to read more, thanks for the information.
https://amoxildelivery.pro/# amoxicillin 500 tablet
http://amoxildelivery.pro/# where to buy amoxicillin 500mg
Seo Tips – Are Usually Backlinks Similar? 워드프레스 백링크
ciprofloxacin generic: buy cipro cheap – cipro 500mg best prices
https://clomiddelivery.pro/# can i order generic clomid tablets
https://amoxildelivery.pro/# amoxicillin order online
http://clomiddelivery.pro/# can you get generic clomid without insurance
buy cipro online canada: ciprofloxacin 500mg buy online – ciprofloxacin 500mg buy online
amoxicillin generic brand: cost of amoxicillin 875 mg – antibiotic amoxicillin
https://amoxildelivery.pro/# prescription for amoxicillin
Good post. I learn something new and challenging on websites I stumbleupon every day. It will always be helpful to read through articles from other writers and use a little something from their sites.
https://clomiddelivery.pro/# where to buy clomid without a prescription