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 } }
Guide To Upvc Repairs Near Me: The Intermediate Guide To Upvc
Repairs Near Me upvc repairs Near me
10 Myths Your Boss Is Spreading Concerning How Do I Get A Spare Car Key http://Www.99811760.xyz
viagra naturale in farmacia senza ricetta: viagra prezzo – miglior sito per comprare viagra online
Farmacia online piГ№ conveniente Tadalafil generico migliore farmaci senza ricetta elenco
http://sildenafilit.pro/# alternativa al viagra senza ricetta in farmacia
Farmacia online piГ№ conveniente
After looking into a number of the articles on your web page, I truly appreciate your way of writing a blog. I book marked it to my bookmark website list and will be checking back in the near future. Please check out my web site as well and tell me your opinion.
10 Top Mobile Apps For Lg American Fridge Freezer freestanding american fridge freezers – Liliana,
farmaci senza ricetta elenco Cialis generico controindicazioni farmaci senza ricetta elenco
15 Best Documentaries On Replacement Upvc Window Handles upvc window repairs near me
срочный ремонт кондиционера
farmacie online affidabili: farmacia online migliore – п»їFarmacia online migliore
viagra generico recensioni viagra farmacia viagra generico recensioni
gel per erezione in farmacia viagra online in 2 giorni viagra naturale
Small L Shape Sofas Tools To Help You Manage Your Daily Life Small L Shape
Sofas Trick That Every Person Must Learn l shaped recliner sofa, Lilliana,
How Much Can Private ADHD Experts Make? uk private adhd assessment
viagra pfizer 25mg prezzo viagra generico viagra 50 mg prezzo in farmacia
acquistare farmaci senza ricetta: Cialis generico recensioni – Farmacia online piГ№ conveniente
10 Quick Tips About What Causes Mesothelioma Other Than Asbestos mesothelioma lawyer (Alfred)
8 Tips To Improve Your Window Repair Maidstone
Game double glazed doors maidstone
farmacie online sicure: Tadalafil generico migliore – comprare farmaci online con ricetta
https://tadalafilit.com/# п»їFarmacia online migliore
Farmacie on line spedizione gratuita
Who’s The Most Renowned Expert On Sports Toto? 안전놀이터
5 Reasons Private Psychiatrist Northern Ireland Is A Good Thing
private psychiatrist bedford (Nelson)
Electric Fire Freestanding: The Good, The Bad, And The Ugly 1920416.xyz
This website really has all the information and facts I wanted concerning this subject and didn’t know who to ask.
comprare farmaci online con ricetta: farmacia online migliore – farmaci senza ricetta elenco
Why Do So Many People Want To Know About Mesothelioma Asbestos
Claim? Mesothelioma attorney
Where Are You Going To Find Repair A Window Be 1 Year From Today?
257634.xyz
Incredible Blog Post
Gosh , what an insightful and contemplative content!
I came across myself affirming as I skimmed
through your dissection of this pivotal matter.
Your assertions were meticulously studied and communicated in a
lucid, captivating manner. I particularly appreciated how you were
capable to extract the essential subtleties and intricacies at operation , without
oversimplifying or ignoring the difficulties .
This entry has presented me a significant amount
to ponder . You’ve undisputedly widened my knowledge and altered my perspective in specific meaningful
forms.
Thankfulness for devoting the energy to share your expertise on this
issue. Write-ups like this are quite a valuable
input to the dialogue . I eagerly await experiencing what other illuminating material you
have in stock .
My webpage: ebet – ebet.free.site.pro –
What Coffee Does Costa Use Strategies From The Top In The Business 221878