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 } }
https://interpharmonline.com/# reddit canadian pharmacy
http://mexicanpharminter.com/# mexican pharmacy online
canadapharmacyonline com
mexican pharmacy online store Mexican Pharm Inter mexican drug stores online
india online pharmacy store: online medicine shopping in india – online medicine shopping in india
https://indiamedfast.com/# order medicines online india
canada drugs
mexican drug stores online buying from online mexican pharmacy mexican pharmacy online store
https://interpharmonline.shop/# maple leaf pharmacy in canada
canadadrugpharmacy com
india online pharmacy store: cheapest online pharmacy india – IndiaMedFast.com
https://indiamedfast.com/# india pharmacy without prescription
iphone pro 256gb iphone pro
canadian pharmacy 24h com safe: canadian drugstore online no prescription – certified canadian international pharmacy
lowest prescription prices online india: IndiaMedFast – online medicine shopping in india
canadian pharmacies that deliver to the us: InterPharmOnline.com – canada rx pharmacy world
india online pharmacy store india pharmacy without prescription online medicine shopping in india
http://indiamedfast.com/# online pharmacy india
buying drugs from canada: canadian drugstore online no prescription – canadian pharmacy price checker
http://interpharmonline.com/# canadian pharmacy store
https://indiamedfast.com/# india pharmacy without prescription
canadapharmacyonline com
india online pharmacy store: online medicine shopping in india – India Med Fast
escrow pharmacy canada: InterPharmOnline.com – canadian pharmacy tampa
buying prescription drugs from india: online medicine shopping in india – lowest prescription prices online india
http://interpharmonline.com/# buying from canadian pharmacies
medication canadian pharmacy
India Med Fast: India Med Fast – buying prescription drugs from india
https://indiamedfast.com/# lowest prescription prices online india
http://interpharmonline.com/# best canadian online pharmacy
https://mexicanpharminter.com/# reliable mexican pharmacies
best canadian pharmacy
reliable canadian pharmacy reviews most reliable canadian online pharmacies canada rx pharmacy
https://mexicanpharminter.shop/# mexican pharmacy online
canadian world pharmacy
http://mexicanpharminter.com/# mexican pharmacy online store
best canadian pharmacy online
lowest prescription prices online india: IndiaMedFast.com – lowest prescription prices online india