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 } }
What’s Next In Skoda Spare Key Lost skoda key
Trường cờ bạc tiền kỹ thuật số crypto casino trong Tiếng Việt cho 60 từ Trường
tiền ảo crypto casino là nền tảng trường
cờ bạc trực tuyến sử dụng tiền điện tử
như Bitcoin Ethereum để giao dịch Người chơi có thể đặt cược chơi các
trò chơi như poker blackjack slots mà không cần tiết lộ thông tin cá nhân Crypto casino mang lại sự an toàn tốc độ
giao dịch nhanh chóng bảo mật cao và minh bạch
https://propeciabestprice.pro/# get cheap propecia pill
https://prednisonebestprice.pro/# prednisone for cheap
where to get zithromax zithromax 250 mg tablet price zithromax 500 without prescription
order generic propecia without insurance: order propecia without a prescription – buy propecia tablets
https://zithromaxbestprice.pro/# buy zithromax canada
http://nolvadexbestprice.pro/# nolvadex price
prednisone without prescription medication prednisone 10 mg tablet 20mg prednisone
cytotec online: buy cytotec online – order cytotec online
14 Businesses Doing A Great Job At Glass Replacement Windows double glazed glass replacement cost (Michell)
A Delightful Rant About Bean Coffee Maker bean to cup coffee machines review
mexican drugstore online: mexican online pharmacies prescription drugs – mexican border pharmacies shipping to usa
mexican rx online: medication from mexico pharmacy – pharmacies in mexico that ship to usa
15 Best Professional SEO Services London Bloggers You Must
Follow london seo firm (Dolly)
Having read this I believed it was extremely enlightening. I appreciate you spending some time and energy to put this information together. I once again find myself spending a lot of time both reading and leaving comments. But so what, it was still worth it.
buying prescription drugs in mexico online: п»їbest mexican online pharmacies – buying prescription drugs in mexico online
mexican drugstore online: mexican drugstore online – mexican drugstore online
10 Ways To Build Your Car Key Replacement
Ford Empire ford Replacement keys near Me
buying prescription drugs in mexico online: medication from mexico pharmacy – buying prescription drugs in mexico
best online pharmacies in mexico reputable mexican pharmacies online mexican drugstore online
buying from online mexican pharmacy: mexican rx online – best online pharmacies in mexico
mexican rx online: mexico drug stores pharmacies – mexico pharmacies prescription drugs
15 Fun And Wacky Hobbies That’ll Make You More Successful At Mazda 2 Key workshop
7 Simple Strategies To Completely Refreshing Your Slot Casino Real Casino Slots (http://Ybsangga.Innobox.Co.Kr/Bbs/Board.Php?Bo_Table=Free&Wr_Id=38114)
mexican border pharmacies shipping to usa: mexican drugstore online – buying prescription drugs in mexico
Guide To Window Repair: The Intermediate Guide The Steps To Window Repair Window Repair
п»їbest mexican online pharmacies: mexican drugstore online – purple pharmacy mexico price list
п»їbest mexican online pharmacies: п»їbest mexican online pharmacies – mexican pharmaceuticals online
An impressive share, I just now with all this onto a colleague who had been performing a little analysis for this. And that he in truth bought me breakfast since I discovered it for him.. smile. So ok, i’ll reword that: Thnx for the treat! But yeah Thnkx for spending some time to debate this, I’m strongly over it and enjoy reading regarding this topic. When possible, as you become expertise, might you mind updating your blog site with an increase of details? It truly is highly a good choice for me. Massive thumb up in this article!