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://rybelsus.shop/# rybelsus pill
5 Laws That Anyone Working In Best 3 Wheel Stroller Should Be Aware Of 3 wheel strollers
ozempic online ozempic online ozempic online
http://rybelsus.shop/# semaglutide cost
What’s The Job Market For Private Psychiatrist Cardiff Professionals?
private psychiatrist cardiff
http://rybelsus.shop/# semaglutide cost
Ozempic without insurance buy ozempic buy ozempic
http://rybelsus.shop/# buy semaglutide online
https://rybelsus.shop/# buy semaglutide pills
Профессиональный сервисный центр по ремонту автомагнитол в Москве.
Мы предлагаем: отремонтировать автомагнитолу
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
https://rybelsus.shop/# buy rybelsus online
buy ozempic: Ozempic without insurance – buy cheap ozempic
rybelsus coupon semaglutide online rybelsus pill
Профессиональный сервисный центр по ремонту автомагнитол в Москве.
Мы предлагаем: ремонт автомагнитол
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
rybelsus coupon: semaglutide cost – buy semaglutide online
buy semaglutide online: rybelsus cost – rybelsus pill
May I just say what a relief to find a person that really understands what they are discussing on the internet. You definitely know how to bring a problem to light and make it important. More and more people ought to read this and understand this side of the story. I was surprised that you’re not more popular since you certainly have the gift.
ozempic coupon: buy ozempic – buy cheap ozempic
http://rybelsus.shop/# buy rybelsus online
ozempic coupon: ozempic online – buy ozempic
https://rybelsus.shop/# semaglutide cost
ozempic generic ozempic coupon ozempic cost
http://ozempic.art/# ozempic cost
Speak “Yes” To These 5 Audi A4 Spare Key Tips Audi Q7 Replacement Key
Stop by my site … Daycare Near Me; Geraldine,
Hey there! I simply wish to offer you a huge thumbs up for the great information you have got right here on this post. I will be returning to your blog for more soon.
https://ozempic.art/# ozempic generic
The Most Underrated Companies To Keep An Eye On In The
Private ADHD Assessment UK Industry private adhd assessment
birmingham (Refugia)
https://rybelsus.shop/# buy rybelsus online
Unexpected Business Strategies That Aided Best Travel Mobility Scooter Uk Succeed best all terrain mobility Scooter uk