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 } }
The 10 Scariest Things About Psychiatrist Assessment psychiatrist assessment
(Larae)
viagra online spedizione gratuita viagra viagra originale in 24 ore contrassegno
Howdy, There’s no doubt that your site could possibly be having web browser compatibility issues. Whenever I take a look at your blog in Safari, it looks fine but when opening in I.E., it’s got some overlapping issues. I just wanted to provide you with a quick heads up! Besides that, wonderful site!
https://farmaciait.men/# acquisto farmaci con ricetta
Farmacie on line spedizione gratuita
farmaci senza ricetta elenco: Farmacia online piu conveniente – farmacia online
The People Who Are Closest To Skoda Superb Replacement
Key Share Some Big Secrets skoda replacement key (Brian)
What Tallest Fridge Freezer 50/50 Experts Want You To Learn best price fridge freezer 50 50
(Ruth)
https://tadalafilit.com/# comprare farmaci online con ricetta
Farmacia online miglior prezzo
farmacia online piГ№ conveniente: Ibuprofene 600 generico prezzo – Farmacia online miglior prezzo
farmacie online autorizzate elenco: BRUFEN 600 acquisto online – farmacie online affidabili
9 . What Your Parents Taught You About Upvc Window Repairs Upvc Window Repairs
10 Healthy Habits For Toto Online Terbaik bandar togel terpercaya; Lupe,
viagra generico prezzo piГ№ basso viagra online siti sicuri le migliori pillole per l’erezione
farmacia online: Cialis generico 5 mg prezzo – Farmacie online sicure
Visit my blog … Jonbian.Co
http://tadalafilit.com/# Farmacia online miglior prezzo
Farmacia online piГ№ conveniente
gel per erezione in farmacia: viagra senza ricetta – miglior sito dove acquistare viagra
Farmacie on line spedizione gratuita Cialis generico 20 mg 8 compresse prezzo farmacia online piГ№ conveniente
farmacie online sicure farmacia online migliore acquisto farmaci con ricetta
farmacia online senza ricetta Cialis generico 20 mg 8 compresse prezzo acquisto farmaci con ricetta
You’ll Never Guess This Double Single Bunk Bed’s Secrets double single bunk (Esteban)
Relish Your Opinions!
I’m Elated you Encountered the Entry Informative.
If you’re Intrigued by Investigating more Openings in the online Gaming
World, I’d Urge Delving into cmd368 – telegra.ph,.
They Feature a Myriad of Captivating Betting Avenues,
Interactive experiences, and a Intuitive
Platform.
What I Really Value about CMD368 is their Commitment to
Sensible Wagering. They have Secure Policies and Tools to Empower Players Stay in control.
Regardless of whether you’re a Proficient Punter or Untrained in the Gambling, I
Think you’d Sincerely Love the Venture.
Please Join By way of the Link and Contact me if you have Further Queries.
acquisto farmaci con ricetta: Cialis generico prezzo – farmacie online affidabili
Farmacie online sicure BRUFEN 600 mg 30 compresse prezzo farmacia online piГ№ conveniente
You’ll Never Guess This Composite Door Panel Replacement’s Benefits composite door panel replacement (Albertha)
viagra pfizer 25mg prezzo viagra farmacia viagra acquisto in contrassegno in italia
comprare farmaci online con ricetta Farmacie on line spedizione gratuita farmacia online senza ricetta
10 Websites To Help You Develop Your Knowledge About Locksmiths Near Me Auto cheap automobile locksmith near me
(Jorg)
http://tadalafilit.com/# farmaci senza ricetta elenco
Farmacia online piГ№ conveniente
10 Things Your Competition Can Teach You About Oil Filled
Radiator 9710861