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 } }
http://sildenafiliq.xyz/# Cheap Sildenafil 100mg
https://tadalafiliq.com/# Tadalafil Tablet
buy Kamagra Kamagra gel buy kamagra online usa
Kamagra tablets: Kamagra gel – buy kamagra online usa
Buy Cialis online tadalafil iq Generic Cialis without a doctor prescription
https://sildenafiliq.xyz/# sildenafil over the counter
sildenafil oral jelly 100mg kamagra: Sildenafil Oral Jelly – Kamagra Oral Jelly
viagra without prescription: Order Viagra 50 mg online – Viagra Tablet price
http://kamagraiq.shop/# buy Kamagra
buy kamagra online usa: Kamagra Oral Jelly Price – sildenafil oral jelly 100mg kamagra
Cheap Sildenafil 100mg: best price on viagra – Viagra online price
Kamagra 100mg price Kamagra Iq super kamagra
https://sildenafiliq.com/# buy Viagra online
Good day! Do you know if they make any plugins to assist with SEO?
I’m trying to get my blog to rank for some targeted keywords but I’m not
seeing very good success. If you know of any please share.
Thank you! I saw similar text here: Scrapebox AA List
sildenafil oral jelly 100mg kamagra Kamagra Oral Jelly Price п»їkamagra
Cialis without a doctor prescription cheapest cialis Generic Tadalafil 20mg price
Kamagra 100mg: Kamagra Iq – Kamagra 100mg price
https://kamagraiq.com/# Kamagra tablets
Viagra online price cheapest viagra viagra without prescription
sildenafil over the counter: buy viagra online – buy Viagra over the counter
п»їkamagra Kamagra gel Kamagra 100mg price
Viagra tablet online over the counter sildenafil viagra without prescription
https://kamagraiq.com/# Kamagra 100mg price
Viagra online price: Viagra tablet online – buy Viagra over the counter
Kamagra 100mg: Kamagra Oral Jelly Price – sildenafil oral jelly 100mg kamagra
https://sildenafiliq.xyz/# generic sildenafil
Kamagra 100mg price kamagra best price Kamagra Oral Jelly
http://tadalafiliq.com/# Generic Cialis price
Generic Tadalafil 20mg price Generic Tadalafil 20mg price Tadalafil price
Viagra without a doctor prescription Canada: buy viagra online – cheapest viagra