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 } }
ремонт кондиционеров в москве
10 Things You Learned From Kindergarden To Help You Get Started With Ghost Immobiliser Installer How To Install A Ghost Immobiliser (http://Pandahouse.Lolipop.Jp/G5/Bbs/Board.Php?Bo_Table=Room&Wr_Id=7023435)
viagra ordine telefonico viagra farmacia viagra prezzo farmacia 2023
Good article. I certainly appreciate this site. Stick with it!
10 Things You’ve Learned In Preschool To Help You Get A Handle On Mens Masturbation Toys auto male masturbator (Devin)
Farmacie on line spedizione gratuita: Farmacie on line spedizione gratuita – farmacie online autorizzate elenco
viagra 100 mg prezzo in farmacia: viagra online siti sicuri – viagra generico sandoz
farmacie online sicure: Cialis generico 20 mg 8 compresse prezzo – Farmacia online piГ№ conveniente
farmaci senza ricetta elenco Brufen 600 prezzo con ricetta Farmacia online miglior prezzo
http://farmaciait.men/# top farmacia online
farmacie online autorizzate elenco
I truly love your website.. Pleasant colors & theme. Did you make this amazing site yourself? Please reply back as I’m attempting to create my own personal blog and would like to find out where you got this from or exactly what the theme is called. Thank you!
farmacia online piГ№ conveniente: Ibuprofene 600 prezzo senza ricetta – Farmacia online piГ№ conveniente
Are You Responsible For An Single Umbrella Stroller Budget?
Twelve Top Ways To Spend Your Money 9324874.xyz
8 Tips To Improve Your ADHD Assessment Private Game
adhd private assessment ireland (Georgetta)
you have got a fantastic blog here! do you want to earn some invite posts on my small blog?
farmacia online: Ibuprofene 600 generico prezzo – Farmacia online piГ№ conveniente
What’s The Job Market For Locksmith For A Car Professionals Like?
locksmith for a car – Bridgette –
farmacia online piГ№ conveniente farmacia online migliore farmacia online piГ№ conveniente
viagra prezzo farmacia 2023 viagra viagra originale in 24 ore contrassegno
Профессиональный сервисный центр по ремонту бытовой техники с выездом на дом.
Мы предлагаем:сервис центры бытовой техники ростов на дону
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
Farmacie on line spedizione gratuita Ibuprofene 600 generico prezzo farmacie online autorizzate elenco
http://sildenafilit.pro/# pillole per erezioni fortissime
farmacia online piГ№ conveniente
10 Graphics Inspirational About How Much Is A Private ADHD Assessment private adhd assessment ireland
adult (Esmeralda)
How To Make A Successful Electric Treadmills For Sale Tutorials On Home
folding electric Treadmill with incline (http://Classicalmusicmp3freedownload.com/ja/index.php?title=10_great_books_on_discounted_treadmills)
Профессиональный сервисный центр по ремонту бытовой техники с выездом на дом.
Мы предлагаем:сервисные центры по ремонту техники в ростове на дону
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
Hiya, I’m really glad I have found this information. Today bloggers publish just about gossip and internet stuff and this is really irritating. A good blog with interesting content, that’s what I need. Thanks for making this site, and I will be visiting again. Do you do newsletters? I Cant find it.
Your style is very unique compared to other folks I have read stuff from. Thank you for posting when you’ve got the opportunity, Guess I’ll just bookmark this web site.
What’s The Current Job Market For Treadmill Foldable Electric Professionals Like?
treadmill foldable electric
farmacia online senza ricetta BRUFEN 600 prezzo in farmacia farmacie online sicure
https://farmaciait.men/# farmacia online
migliori farmacie online 2024