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://mexicanpharmi.com/# mexican mail order pharmacies
https://indiapharmi.com/# india pharmacy
http://canadianpharmi.com/# over the counter ed
http://mexicanpharmi.com/# mexican online pharmacies prescription drugs
mexico drug stores pharmacies Legit online Mexican pharmacy mexico drug stores pharmacies
http://canadianpharmi.com/# ed medicines
https://mexicanpharmi.com/# medication from mexico pharmacy
erectyle disfunction Best Canadian pharmacy ed treatments
http://indiapharmi.com/# online shopping pharmacy india
buy prescription drugs from canada cheap: Best Canadian online pharmacy – new ed treatments
These are the leaders of societies so ancient and but so secret, most individuals refuse to believe they exist.
top 10 online pharmacy in india Online India pharmacy indian pharmacies safe
buying prescription drugs in mexico: Best online Mexican pharmacy – reputable mexican pharmacies online
A nice post. My partner and I particularly had trouble understanding some points you mentioned in your write-up. I later realized what you were saying after I had understood some of your linked posts on this site. Important things have changed greatly together with the advent of internet, online community, and mobile phone SMSing. Thanks for getting the whole thing to my personal understanding.
buy prescription drugs from canada: Cheapest drug prices Canada – best ed pills
carprofen without vet prescription: Best Canadian online pharmacy – real cialis without a doctor’s prescription
ed medications comparison: canadianpharmi – natural cures for ed
The “calvo” password is unique in that it is among the few passwords in the game that may be guessed, reasonably than read out of a datacube (it appears on a poster in Alex’s office).
As voice assistants turned more frequent, GE Appliances grew to become the first U.S.
http://indiapharmi.com/# best india pharmacy
mexican pharmaceuticals online: Online pharmacy – medication from mexico pharmacy
buy prescription drugs from india Best online Indian pharmacy top online pharmacy india
india online pharmacy: India pharmacy delivery – Online medicine order
https://indiapharmi.com/# online pharmacy india
indian pharmacies safe Online medicine home delivery india online pharmacy
https://canadianpharmi.com/# canadian pharmacy
glГјcksspiel internet online casino websites bahis giriЕџ
casino bahis siteleri: en iyi kumar sitesi – kumar sitesi
pinup 2025 пин ап казино пин ап зеркало
https://pinup2025.com/# пин ап казино официальный сайт