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 } }
Pharmacie en ligne livraison Europe https://tadalafilmeilleurprix.com/# Pharmacie en ligne livraison Europe
Guide To Window Frame Repair Near Me: The Intermediate Guide
Towards Window Frame Repair Near Me window Frame repair near me
http://tadalafilmeilleurprix.com/# п»їpharmacie en ligne france
Pharmacie sans ordonnance
Prix du Viagra en pharmacie en France: Viagra pharmacie – Viagra vente libre pays
pharmacie en ligne sans ordonnance https://kamagrameilleurprix.shop/# pharmacie en ligne sans ordonnance
pharmacie en ligne france livraison belgique kamagra pas cher Pharmacie en ligne livraison Europe
Achat mГ©dicament en ligne fiable https://pharmaciemeilleurprix.com/# pharmacie en ligne france livraison belgique
http://tadalafilmeilleurprix.com/# pharmacie en ligne france livraison belgique
acheter mГ©dicament en ligne sans ordonnance
Prix du Viagra en pharmacie en France Viagra sans ordonnance 24h SildГ©nafil 100 mg prix en pharmacie en France
http://viagrameilleurprix.com/# Acheter Sildenafil 100mg sans ordonnance
п»їpharmacie en ligne france
pharmacie en ligne pas cher: kamagra en ligne – pharmacie en ligne livraison europe
https://tadalafilmeilleurprix.com/# pharmacie en ligne pas cher
Achat mГ©dicament en ligne fiable
Mental Health Help Near Me: What No One Is Discussing private mental health assessment cost (Shanice)
5 Common Myths About Mental Health Assessments You Should
Stay Clear Of needs Assessment for mental health
doxycycline online paypal: doxycycline over the counter india – doxycycline capsule price
buying doxycycline uk price of doxycycline average price of doxycycline
where can i get generic clomid without rx: buying clomid for sale – can i order cheap clomid no prescription
http://doxhealthpharm.com/# doxycycline 150 mg cost
doxycycline cost canada: can you buy doxycycline over the counter australia – can i buy doxycycline online
https://doxhealthpharm.com/# doxycycline online uk
https://zithropharm.com/# zithromax purchase online
where to buy amoxicillin over the counter: amoxicillin capsule 500mg price – can we buy amoxcillin 500mg on ebay without prescription
can i order cheap clomid: ClmHealthPharm – where buy generic clomid tablets
https://clmhealthpharm.com/# cost cheap clomid price
zithromax 500 mg lowest price online: zithromax online pharmacy canada – zithromax for sale us
Wooden Window Frame Repairs Near Me Tools To Help You Manage
Your Everyday Lifethe Only Wooden Window Frame Repairs Near Me Trick Every Individual
Should Know window frame Repairs near me
How To Explain Mental Health Diagnosis To Your Grandparents mental health capacity assessment
https://amohealthpharm.com/# where to buy amoxicillin
canadian pharmacy amoxicillin: buy amoxicillin online with paypal – price for amoxicillin 875 mg
buy amoxicillin 500mg online: amoxicillin generic – where can i buy amoxicillin over the counter uk