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 } }
http://gabapentin.auction/# order neurontin
zithromax purchase online
neurontin generic gabapentin for sale neurontin 150 mg
gabapentin 300: neurontin 600mg – neurontin 4 mg
amoxicillin 500mg buy online canada: buy amoxil – amoxicillin 500mg capsules price
https://amoxil.llc/# amoxicillin 825 mg
What’s The Ugly Truth About Upvc Window Seal Replacement oven Seal repair
This is the perfect website for anybody who wants to understand this topic. You understand so much its almost hard to argue with you (not that I really will need to…HaHa). You certainly put a brand new spin on a topic that has been discussed for many years. Wonderful stuff, just wonderful.
http://zithromax.company/# zithromax 500 price
my blog post … online Poker Tournaments
amoxicillin 500mg capsules uk buy amoxicillin 500mg canada amoxicillin 500mg capsules
http://amoxil.llc/# can i buy amoxicillin online
zithromax antibiotic without prescription
Guide To Daftar Akun Togel Resmi: The Intermediate Guide To Daftar Akun Togel Resmi Daftar Akun Togel Resmi
https://amoxil.llc/# amoxicillin azithromycin
Why We Enjoy Affordable Search Engine Optimization (And You Should, Too!) Seo optimization services
http://amoxil.llc/# buy amoxicillin canada
zithromax coupon: buy zithromax z-pak online – zithromax prescription online
http://stromectol.agency/# minocycline 50 mg online
https://amoxil.llc/# amoxicillin 875 mg tablet
where can i get zithromax over the counter
Rybelsus 14 mg price Semaglutide pharmacy price buy semaglutide online
https://zithromax.company/# zithromax capsules price
can i buy zithromax online
Профессиональный сервисный центр по ремонту моноблоков iMac в Москве.
Мы предлагаем: сервисный центр imac
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
https://semaglutide.win/# cheap Rybelsus 14 mg
how to get amoxicillin over the counter: amoxicillin cheapest price – amoxicillin 500mg price in canada
https://semaglutide.win/# Rybelsus 7mg
amoxicillin 500 mg purchase without prescription: Amoxicillin For sale – where to get amoxicillin over the counter
Say “Yes” To These 5 Hyper Realistic Sexdoll Tips Hyper Realistic Sex Doll
Профессиональный сервисный центр по ремонту моноблоков iMac в Москве.
Мы предлагаем: ремонт аймака в москве
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
https://amoxil.llc/# amoxicillin 500mg over the counter
Rybelsus 14 mg price semaglutide Rybelsus 14 mg price
stromectol uk stromectol for sale ivermectin 4000