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 } }
20 10kg Washers Websites Taking The Internet By Storm http://www.023456789.xyz
10 Top Mobile Apps For Private Adhd Assessment adhd assessment In Uk
Tips On Loans & Debts 저신용자 대출
A Trip Back In Time How People Discussed Mercedes Benz Key Replacement 20 Years Ago Replacement Mercedes Key Fob
The 10 Steps To Obtain Money Originating From A Bank 신생아 특례 대출
Ten Startups That Are Set To Change The Pvc Window Repairs Industry For The Better Upvc Window repair
How To Solve Issues Related To Upvc Window Repairs upvc window repairs near me
The History Of Upvc Door Locks upvc doors locks [Claire]
This Is The Ultimate Guide To Affordable Search Engine Optimization best local search engine optimization companies (Tm-metall.ru)
Personal Loan For Terrible Credit – The Best Way To Evade The Barriers 비상금 대출
Bad Credit Doesn’t Really Need To Be Hell! 소상공인 대출
สวัสดีค่ะ! ebet gaming เป็นผู้ให้บริการเกมออนไลน์ที่ได้รับความนิยมอย่างแพร่หลายในวงการพนันคาสิโนออนไลน์ ebet slots เป็นหนึ่งในเกมที่มีเนื้อหาที่น่าสนใจจาก ebet ที่ผู้เล่นสามารถสนุกไปกับเกมสล็อตที่กราฟิกสวยงามและเสียงจริงจัง อีกทั้งยังมีบาคาร่าออนไลน์จาก ebet ที่น่าสนใจมากเช่นกัน หากคุณต้องการพบกับประสบการณ์การเล่นคาสิโนที่ไม่เหมือนใคร คุณสามารถเข้าสู่ ebet casino และเล่นเกมต่างๆได้อย่างอุ่นใจและปลอดภัย ด้วยความสำคัญที่ผู้ให้บริการ ebet
ให้กับความพึงพอใจของผู้เล่น จึงมีบาคาร่าจาก ebet ที่มีคุณภาพสูงและรูปแบบการเล่นที่ให้ความบันเทิงได้อย่างแท้จริง อย่างที่คุณถามว่า ebet gaming คืออะไร
ก็คือผู้ให้บริการเกมคาสิโนที่ได้รับความนิยมและเชื่อถือจากผู้เล่นหลายๆ คนค่ะ
Here is my web site – รีวิวคาสิโนออนไลน์
What Can Seo Really Do For Business Enterprise? seo 백링크
3 Reasons Targeted Traffic From One Way Link Building Is So Powerful 구글상위노출
The 10 Scariest Things About Spare Keys 99811760
Baccarat – The Royal Game & Great Odds 에볼루션 주식시장 게임
The very next time I read a blog, Hopefully it does not fail me as much as this one. I mean, I know it was my choice to read, nonetheless I really believed you would have something helpful to talk about. All I hear is a bunch of moaning about something you could possibly fix if you were not too busy seeking attention.
ยินดีต้อนรับเข้าไปสู่บริษัท Cicon Interiorซึ่งให้บริการ บิ้วอินตกแต่งภายในครบวงจรในสไตล์ที่ไม่ซ้ำใคร
ด้วยความพิถีพิถันและมีคุณภาพสูง หากคุณกำลังมองหาบริการเฟอร์นิเจอร์ชิ้นในอาคารที่จะสร้างความประทับใจให้กับบ้าน คอนโดหรือออฟฟิศของคุณ บริษัท Cicon Interior ที่คุณสามารถพูดคุยและให้คำปรึกษาเกี่ยวกับการสร้างเอกลักษณ์และความเป็นตัวคุณของการออกแบบบิ้วอินที่คุณต้องการ ด้วยประสบการณ์และความเชี่ยวชาญของทีมงานที่มีคุณภาพ คุณจะได้รับการดูแลอย่างใกล้ชิดและครอบคลุมทุกขั้นตอนของงานบิ้วอิน จนถึงการสร้างบิ้วอินเสร็จสิ้น กับ Cicon Interior
คุณจะได้รับผลลัพธ์
เฟอร์นิเจอร์บิ้วอินที่มีคุณภาพทั้งมีการออกแบบที่ดี และความทนทาน และการบริการสูงที่จะเป็นประโยชน์ต่อคุณในระยะยาว.
my web blog: บิวอินห้องครัว
Online Bingo – Join The Fun, Join Reused
. 프라그마틱 카지노
10 Myths Your Boss Is Spreading Regarding Double Glazing
Suppliers Near Me double Glazed window; Tips.gives,
Greetings, fellow enthusiast. I must laud you on your keen analysis of the subject matter presented in this blog
post. Your astute observations and eloquent commentary have resonated
with me, and I ascertain myself in consensus
with the beliefs you have verbalized .
Given your discernible intrigue in the realm of technological finance, I would be careless
if I did not present an invitation for you to discover the electrifying world of Crypto Casino.
This groundbreaking platform offers a rare and gripping experience ,
merging the excitement of conventional casino gaming with the
innovative solutions of digital assets . I suspect
you would discover it a most compelling expedition .
I welcome you to be a part of us and unveil the perpetual horizons that are poised
you.
Here is my web-site … online casino player satisfaction
20 Important Questions To To Ask About Headphones Noise Cancelling Prior
To Purchasing Headphones Noise Cancelling http://www.3222914.xyz
Do Not Buy Into These “Trends” Concerning Collapsible Mobility Scooter Salina
Bad Credit Bank Loans Are Possible 무직자 대출
Upvc Door Handles: 11 Thing You’re Forgetting To Do New upvc door
8 Tips To Enhance Your Slot Demo Zeus Hades Rupiah Game oscarreys
See What Double Glazing Repairs Near Me
Tricks The Celebs Are Using double glazing repairs near me
From All Over The Web From The Web: 20 Awesome Infographics About Door Repair Near Me window replacement Near me
5 Killer Quora Answers On Medical Malpractice Claim medical malpractice attorney
Why You’ll Need To Find Out More About Best American-Style
Fridge Freezer Zack Foxworth