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 } }
mexican mail order pharmacies: mexico pharmacies prescription drugs – medication from mexico pharmacy
Warmly fellow reader ,
I came across the insights shared in this blog post to be remarkably fascinating.
The writer’s grasp of the content is undoubtedly commendable.
If you are seeking a electrifying and gainful virtual
gaming excursion , I would enthusiastically encourage
you to uncover the choices of VIVARO CASINO.
With its comprehensive collection of enthralling diversions ,
ample rewards , and hassle-free system , VIVARO CASINO
grants an matchless entertainment ambiance that appeals to
both beginner and proficient gamers identically
.
I encourage you to discover VIVARO CASINO and discover
the thrill that lies in store you. I am sure
you will view the excursion to be highly pleasurable .
Best regards
My web page – online casino community engagement
ed drugs online from canada: canada drugstore pharmacy rx – canada cloud pharmacy
reputable indian pharmacies: buy prescription drugs from india – best india pharmacy
mexican pharmaceuticals online: mexican rx online – mexico drug stores pharmacies
canadian online pharmacy: canadian pharmacy 24 com – canadian drugs pharmacy
https://foruspharma.com/# mexican mail order pharmacies
Online medicine home delivery best online pharmacy india mail order pharmacy india
best india pharmacy: india online pharmacy – india online pharmacy
buying prescription drugs in mexico online: mexican border pharmacies shipping to usa – mexican online pharmacies prescription drugs
onlinecanadianpharmacy: rate canadian pharmacies – canadian pharmacy
https://indiapharmast.com/# reputable indian pharmacies
https://foruspharma.com/# buying from online mexican pharmacy
mexican rx online: mexico pharmacies prescription drugs – mexico pharmacies prescription drugs
I absolutely love your website.. Very nice colors & theme. Did you make this site yourself? Please reply back as I’m wanting to create my own blog and want to know where you got this from or exactly what the theme is named. Cheers!
canadian medications: legal to buy prescription drugs from canada – legitimate canadian pharmacy online
Find Legitimate Unsecured Bank Loans With These Five Basic Steps 2ace
다바오 (casablancacasinotci.com)
Pay Whole Creditors Using The An Unsecured Consolidation Loan 다바오 올인클루시브 호텔
Ups And Downs Of Online Poker Bonuses 다바오 포커 충전 방법
You Will Have A Loan – Careless Credit Fast Cash Loan 다바오 환전
Poker Could Be The Ultimate Card Game 다바오 커플 호텔
Organic Search Engine Marketing Tactics For Online
Programs seo 백링크
Search Engine Optimization – From Zero To Hero 검색엔진최적화 사례
When I initially left a comment I appear to have clicked on the -Notify me when new comments are added- checkbox and from now on each time a comment is added I get 4 emails with the exact same comment. Is there a way you are able to remove me from that service? Kudos.
Keyword Research For Seo 백링크 확인 (http://forretailers.com)
The Top Casino Gambling Games 에볼루션 코리아 (http://imagesecure.com/)
Aw, this was a really nice post. Taking the time and actual effort to generate a really good article… but what can I say… I put things off a whole lot and never seem to get anything done.
How Decide On A Best Seo Company 백링크 확인 (gregoryromine.com)
I used to be able to find good info from your blog articles.
How To Rank Higher On Search Engines By Getting High Page Rank seo 최적화