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 pharmaceuticals online: п»їbest mexican online pharmacies – best online pharmacies in mexico
https://mexicandeliverypharma.online/# mexico drug stores pharmacies
mexican drugstore online: mexican pharmaceuticals online – purple pharmacy mexico price list
mexico drug stores pharmacies: buying prescription drugs in mexico online – mexican pharmaceuticals online
reputable mexican pharmacies online: buying prescription drugs in mexico online – medicine in mexico pharmacies
mexican online pharmacies prescription drugs: mexico drug stores pharmacies – pharmacies in mexico that ship to usa
How To Get New Business 쥬라기 월드 에볼루션
10 Tips For Quickly Getting Mobility Scooter
lightweight mobility Scooters
15 Secretly Funny People Working In Upvc Door Handles upvc
panels for doors – Juan –
Are Times Tough? A Simple Cash Loan May Really Do The Help You Should 다바오 포커 아이폰다운로드
Learn About Buy Chest Freezer When You Work From Home fridge Freezer Uk,
https://pro-toulouse.Icam.fr,
Top Five Tips On Qualifying For A Va Loan 전세자금 대출
10 Reasons You’ll Need To Be Aware Of Adhd Symptoms In Adults Test adult adhd symptom checklist
How To Create An Awesome Instagram Video About U Shaped Sectional
Chaise black u shaped sectional
Ten Upvc Door Panel Replacements That Really
Improve Your Life upvc door panel Replacements (http://promarket.in.ua)
5 Greenpower Scooter Projects For Any Budget power mobility scooter
Nabbing $5,000 With A Less-Than-Perfect Credit Personal Loan 골드페이
(http://www.lisapresleymemphis.net/__media__/js/netsoltrademark.php?d=posteezy.com/8-things-credit-card-holders-must-be-aware)
I love reading a post that can make men and women think. Also, thank you for allowing for me to comment.
5 Killer Quora Answers On All SEO Company In London All Seo Company In London
amoxicillin from canada: amoxicillin price without insurance – price for amoxicillin 875 mg
Now You Will Seo, Too – Seo For Beginners seo 마케팅
How To Choose A Plastic Card For Purchasing Gas 전세자금 대출 [http://aniremis.com]
where to buy amoxicillin 500mg without prescription: amoxicillin 500mg price – ampicillin amoxicillin
clomid sale: get cheap clomid without rx – buy cheap clomid without prescription
can i order clomid pill: can i order generic clomid no prescription – get clomid without rx
paxlovid pharmacy: paxlovid pill – paxlovid pill
The Free Online Backlink Checker! I Know Where You
Are Able To Find Person! seo 최적화 (http://www.hrcu.tv)
Too Much Payday Loan And Minute Card Debt? Try Consolidation gg포커 다바오
Reasons Why People Need Bank Loans 다바오 포커 충전 방법
How To Develop A Search Engine Friendly Website 구글 백링크 (rbenorthwesteng.com)