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 } }
5 Killer Quora Answers On Realisticsex Doll realisticsex doll
prednisone over the counter: how to purchase prednisone online – prednisone brand name india
24-Hours To Improve Bunk Beds For Children Edda Fay
lasix generic: cheap lasix – lasix
The safety council has 5 everlasting members (Britain, China, France, Russia, and the United States) and 10 members elected by the overall assembly that serve two-12 months terms (presently Angola, Bulgaria, Cameroon, Chile, Germany, Guinea, Mexico, Pakistan, Spain and Syria).
prednisone pill: prednisone acetate – prednisone 20 mg pill
https://rybelsus.tech/# cheap Rybelsus 14 mg
16 Must-Follow Facebook Pages To Vauxhall Insignia Key Replacement-Related Businesses replacement vauxhall key fob (https://calm-deer-hvnt7v.mystrikingly.com/blog/undeniable-proof-that-you-need-vauxhall-astra-key-Replacement)
Сервисный центр предлагает ремонт холодильника dexp рядом ремонт холодильника dexp в петербурге
Those who have very flat arches, very high arches, or plantar fasciitis will need to think about a shoe that gives more arch support.
neurontin capsules neurontin 400 mg price neurontin 400mg
Alternatively, you should use an eSIM that you simply purchase and set up before arriving.
lasix 20 mg: buy furosemide – lasix medication
generic ventolin medication: Buy Albuterol for nebulizer online – ventolin generic brand
lasix online: furosemide 40 mg – furosemide 40 mg
The Top Reasons People Succeed In The Table Top Fridge With Ice
Box Industry 77564623.xyz (Jacqueline)
What are the three Unforgivable Curses?
There may be all the time a wonderful alternative in every day even on this model new Saturday.
lasix 20 mg lasix generic buy furosemide online
https://ventolininhaler.pro/# ventolin otc usa
Buy compounded semaglutide online: buy semaglutide online – Rybelsus 7mg
prednisone in canada prednisone 25mg from canada buy prednisone online uk
L Shaped Loft Bunk Beds: The Secret Life Of L Shaped Loft Bunk Beds l-shaped loft
bunk beds (Paige)
You’ll Never Guess This Togel4d Login’s Tricks togel4d login (Lorrie)
prednisone 50 mg for sale prednisone without rx can you buy prednisone over the counter in mexico
https://gabapentin.site/# neurontin 800 mg cost
Ten Things You Learned In Kindergarden That’ll Help You With Replacement Handles
For Upvc Windows Upvc Window near me
prescription medication neurontin: neurontin 400 mg price – neurontin canada online
https://rybelsus.tech/# cheap Rybelsus 14 mg
farmaci senza ricetta elenco: Farmacia online migliore – acquisto farmaci con ricetta