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 } }
purple pharmacy mexico price list
http://cmqpharma.com/# п»їbest mexican online pharmacies
buying prescription drugs in mexico online
Nine Things That Your Parent Teach You About Upvc Windows
Near Me upvc windows near me (https://Overby-chavez.hubstack.net/ten-things-your-competitors-lean-you-on-window-and-door-repair-near-me/)
mexican online pharmacies prescription drugs: cmq mexican pharmacy online – buying prescription drugs in mexico
Guide To Second Hand Mobility Scooters For Sale Near Me: The Intermediate Guide To Second Hand Mobility
Scooters For Sale Near Me Mobility Scooters For Sale Near
Me (Forum.Ondaytrip.Com)
Guide To Truck Accidents Attorney: The Intermediate Guide For Truck Accidents Attorney truck accident – https://kostromama.ru/Forum/Index.php?mama44sessid=6egmch02f1p9bjub2i2lq2jj95&action=redirector;url=aHR0cHM6Ly93aWxseXNmb3JzYWxlLmNvbS9hdXRob3Ivc3VuZGF5b2ZmaWNlMC8 –
mexico pharmacies prescription drugs: cmq pharma – purple pharmacy mexico price list
reputable mexican pharmacies online
https://cmqpharma.com/# mexico drug stores pharmacies
mexican rx online
very good post, i definitely adore this web site, persist with it
Guide To Online Shopping Sites In United Kingdom:
The Intermediate Guide In Online Shopping Sites In United Kingdom online shopping sites
in united Kingdom – http://laosubenben.com/home/link.php?url=https://vimeo.Com/932084467 –
Why You Must Experience Top Slots At The Very Least Once In Your Lifetime slots with Free bonus Rounds
buying prescription drugs in mexico online
https://cmqpharma.online/# mexican mail order pharmacies
mexican drugstore online
What’s The Job Market For Double Glazing Near Me Professionals Like?
double glazing near me
A Step-By-Step Guide For Choosing Your CSGO
Cases Opening web Case
Looking For Inspiration? Check Out Narrow Electric Wheelchair bariatric electric wheelchair (wwwwa.l.R.u.scv.kd)
The Top Double Glazed Windows Repairs Gurus Are Doing 3 Things misted
It arduous to seek out knowledgeable people on this topic, however you sound like you recognize what you are talking about! Thanks
What’s The Job Market For Double Glazing Repairs Near Me Professionals Like?
double glazing repairs near me (http://www.fukushima.st/mff/bbs/bbs.cgi/)
What’s The Job Market For Window Repair Near Me Professionals Like?
window repair near me (http://fwme.eu)
A Look At The Future What’s The Best SEO Company UK Industry Look
Like In 10 Years? Seo Companies
A claim for Asbestos Compensation [Cse.Google.Cg]
is a claim to receive financial compensation from the business or companies that are responsible for asbestos exposure.
20 Reasons To Believe Why Are CSGO Skins Going Up In Price Cannot Be Forgotten cs2 cases (Nell)
How Truck Accident Attorney Rose To The #1 Trend On Social Media Truck Accident Lawyers
7 Secrets About CSGO Case Battle Sites That Nobody Can Tell You Case opening
20 Things You Need To Know About Skoda Spare Key skoda rapid key Lost
my brother has a gambling problem and he just burned a thousand bucks in one night::
A Look At The Good And Bad About Window Repairs upvc window Repairs
Learn To Communicate Auto Accident Law To Your Boss festus auto accident
lawsuit (https://Vimeo.com)
The 10 Most Scariest Things About Espresso Coffee Beans 1kg espresso coffee beans 1kg – https://www.exdex.ru/,
Three Greatest Moments In Drip Coffee Maker History
filter drip coffee maker [Myrtle]
mexican online pharmacies prescription drugs: mexican online pharmacy – reputable mexican pharmacies online