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 } }
This is a topic which is close to my heart… Many thanks! Where are your contact details though?
https://amoxil.llc/# amoxicillin script
zithromax 500 mg lowest price online
http://semaglutide.win/# Rybelsus 14 mg
Профессиональный сервисный центр по ремонту электросамокатов в Москве.
Мы предлагаем: ремонт электросамокатов
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
minocycline 50mg tabs: buy stromectol online – cost of ivermectin cream
amoxicillin cephalexin amoxicillin cheapest price amoxicillin 500 mg without a prescription
https://amoxil.llc/# amoxicillin price canada
zithromax 250 mg australia
15 Best ADHD Medication Uk Bloggers You Need To Follow Best adhd medication Uk
https://stromectol.agency/# buy minocycline 50mg tablets
cost of generic zithromax
https://gabapentin.auction/# neurontin 4 mg
http://zithromax.company/# buy zithromax 1000 mg online
Buy semaglutide pills: Rybelsus 14 mg price – rybelsus generic
Excellent article! We are linking to this great article on our website. Keep up the great writing.
cheap Rybelsus 14 mg: semaglutide – semaglutide
https://stromectol.agency/# minocycline pill
Wow, this write-up exceptionally strike the nail upon the brain! I’ve been having
difficulties with this make a difference for yrs and it’s therefore fresh new
towards check out somebody extremely dive deep
into the situation and supply easy companies. The illustrations oneself made available had been surprisingly relatable and I found out myself nodding
alongside as I go through during them.
One particular detail that exceptionally resonated with
me was the actuality yourself generated with regards to the
worth of self-treatment. It’s consequently straightforward toward receive stuck up within the working
day-towards-working day grind and ignore our individual health and fitness.
Nonetheless as by yourself rightly pointed out, using the season towards recharge and
prioritize our psychological and bodily health and fitness is imperative if we require
towards be our simplest selves. I’m unquestionably transferring toward consider applying some of
the suggestions on your own shared. Thank yourself for this enlightening and inspiring report!
buy rybelsus semaglutide Rybelsus 14 mg
https://amoxil.llc/# amoxicillin 30 capsules price
ivermectin purchase buy stromectol online buy minocycline online
http://gabapentin.auction/# neurontin 200 mg tablets
20 Tips To Help You Be Better At Private ADHD Assessments Private Adhd Assessment Lancashire
Профессиональный сервисный центр ремонт телефонов с гарантией ремонт смартфонов москва
Профессиональный сервисный центр по ремонту бытовой техники с выездом на дом.
Мы предлагаем: сервисные центры по ремонту техники в воронеже
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
https://gabapentin.auction/# neurontin 300 mg capsule
amoxicillin 500mg buy online uk buy amoxil buy amoxicillin without prescription
neurontin 100mg tablet: order gabapentin – neurontin 200
I really love your blog.. Very nice colors & theme. Did you build this website yourself? Please reply back as I’m planning to create my own blog and want to find out where you got this from or exactly what the theme is named. Many thanks!
So if the houses in your neighborhood have concrete driveways, investing in expensive brick pavers may not be in your greatest interest financially.
https://stromectol.agency/# buy minocycline online
Many have turned to used cars and others to leasing, hoping to keep away from a hefty down cost and decrease their monthly cost.