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 } }
You’ve provided a fresh take on this issue.오피
acquistare farmaci senza ricetta: Farmacie on line spedizione gratuita – farmacie online sicure
http://farmaciait.men/# Farmacia online piГ№ conveniente
farmacia online senza ricetta
farmacia online senza ricetta: Cialis generico 20 mg 8 compresse prezzo – Farmacie on line spedizione gratuita
viagra generico prezzo piГ№ basso: viagra – pillole per erezione in farmacia senza ricetta
https://sildenafilit.pro/# miglior sito per comprare viagra online
farmacia online piГ№ conveniente
farmaci senza ricetta elenco Tadalafil generico migliore farmacie online affidabili
farmacia senza ricetta recensioni: viagra subito – viagra 50 mg prezzo in farmacia
http://sildenafilit.pro/# alternativa al viagra senza ricetta in farmacia
farmacie online autorizzate elenco
farmacia online farmacia online migliore farmaci senza ricetta elenco
viagra generico sandoz viagra generico siti sicuri per comprare viagra online
migliori farmacie online 2024: Cialis generico 20 mg 8 compresse prezzo – farmacie online affidabili
viagra subito acquisto viagra viagra online in 2 giorni
Farmacia online piГ№ conveniente Farmacia online migliore top farmacia online
comprare farmaci online con ricetta Tadalafil generico migliore farmacie online affidabili
https://tadalafilit.com/# migliori farmacie online 2024
top farmacia online
farmaci senza ricetta elenco: Farmacia online migliore – farmacia online piГ№ conveniente
That’s how males’s vogue has evolved from the idea of formality to the place where they search consolation in every thing they wear.
All other matters are decided with a simple majority.
Walter & Cherie Glaser are a world journey-writing team based mostly down under in Melbourne, Australia.
Если вы искали где отремонтировать сломаную технику, обратите внимание – выездной ремонт бытовой техники в волгограде
Hello there! This post could not be written much better! Looking through this article reminds me of my previous roommate! He constantly kept talking about this. I will send this post to him. Fairly certain he will have a great read. Thanks for sharing!
viagra pfizer 25mg prezzo: viagra – farmacia senza ricetta recensioni
You will need to scroll right down to the heading for the SVG & PNG Download, the place you will note a link in a mild blue box to download the file.
If you’re hourly, when does time beyond regulation kick in?
Many of these are new to me, though I’ve been using Gradible 🙂 can’t wait to research these extra when I’m off my telephone!
Antlers might be modeled off any real life Antlers belonging to Deer, Moose, and so forth.
Poor distribution is the primary trigger of failure.
farmacia online Farmacia online piГ№ conveniente acquisto farmaci con ricetta
Easily dressed up or down, Cole Haan’s Chelsea boot in smooth leather or suede is a versatile, go-with-something shoe for cooler weather.