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://gabapentin.auction/# neurontin buy online
generic zithromax 500mg india
minocycline 100mg tablets: stromectol price – ivermectin 1
minocycline 50mg tabs: ivermectin 8 mg – ivermectin 6
http://semaglutide.win/# Buy semaglutide pills
buy zithromax canada zithromax best price zithromax for sale cheap
https://semaglutide.win/# Rybelsus 14 mg
How To Beat Your Boss On Electric Fireplace Mantels electric firesuite; telegra.Ph,
Профессиональный сервисный центр по ремонту моноблоков iMac в Москве.
Мы предлагаем: срочный ремонт аймака
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
https://gabapentin.auction/# neurontin cap 300mg price
how much is zithromax 250 mg
https://gabapentin.auction/# neurontin pfizer
ivermectin purchase stromectol for sale stromectol pill for humans
zithromax buy order zithromax zithromax pill
https://semaglutide.win/# Semaglutide pharmacy price
5 Clarifications On Diagnostics Near Me how Much is A car diagnostics test
https://gabapentin.auction/# neurontin price comparison
Buy semaglutide pills: Buy compounded semaglutide online – order Rybelsus for weight loss
https://stromectol.agency/# minocycline 100
can i buy zithromax online
20 Up-And-Comers To Follow In The Best Bunk Industry Bunk Beds
http://gabapentin.auction/# purchase neurontin
http://zithromax.company/# zithromax buy
where to get zithromax over the counter
rybelsus price: Rybelsus 14 mg price – Buy compounded semaglutide online
can i buy zithromax over the counter: generic zithromax – zithromax for sale us
can you buy amoxicillin over the counter canada Amoxicillin For sale buy amoxicillin online mexico
10 Sites To Help You To Become A Proficient In How To Get ADHD Diagnosis diagnosis of adult adhd
https://semaglutide.win/# Buy semaglutide pills
https://zithromax.company/# zithromax online usa
The 10 Most Terrifying Things About Bandar Togel Terpercaya
bandar togel Terpercaya
http://amoxil.llc/# amoxicillin where to get
how to buy zithromax online
8 Tips To Up Your Sports Toto Game 메이저사이트 바록가기
can i buy amoxicillin online Amoxicillin For sale purchase amoxicillin 500 mg