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 } }
Why Adding A Upvc Doors To Your Life Can Make All The The
Difference letterbox for upvc Doors
What’s The Ugly Reality About Glass Replacement Windows Glass Window replacements
10 Apps That Can Help You Manage Your Upvc Windows Repairs double glazed Window repairs near me
What’s The Job Market For Fela Attorneys Professionals Like?
fela attorneys (Legendawiw.ru)
12 Facts About Upvc Windows And Doors That Will Inspire You To Look More Discerning Around The Cooler.
Cooler upvc window repairs (Randi)
Futon For Sale Near Me Tools To Improve Your Daily Life Futon For
Sale Near Me Trick That Every Person Should Learn Futon For Sale Near Me
The Most Valuable Advice You Can Ever Receive About Slots
kaymell.uk
Guide To Double Glazing Near Me: The Intermediate Guide Towards Double Glazing Near Me double glazing near me [https://www.fitness-foren.de/]
The 10 Most Terrifying Things About Fireplace Charli
See What Best 18 Wheeler Accident Attorney Tricks The Celebs
Are Using 18 Wheeler Accident Attorney
How To Find The Perfect 18-Wheeler Accident Attorneys Online 18 Wheeler accident Lawyer
10 Tips For Small Lightweight Electric Wheelchair That Are Unexpected best Power chair
Wow, this was a really informative and detailed write-up on the environment
of crypto virtual gaming hubs ! As someone who’s been delving into the
landscape of crypto decentralized gambling ,
I really commend you exploring all the critical attributes – from the best
cryptocurrency casinos with generous offers and premium amenities , to the rise of
incognito possibilities for enhanced confidentiality .
It’s impressive to see how this sector is
unceasing transforming to serve the rising demand .
I applaud for crafting such a exhaustive and
insightful reference – it’s just the sort of knowledge
I was seeking to navigate the captivating cryptocurrency
betting house world . Best regards !
My webpage :: online craps
20 Myths About Repair A Window: Busted double glazed window Repairs near me
5 Lessons You Can Learn From Door Repair Near Me fitter
Why Adding A Double Glazed Window Luton To Your Life’s Activities Will Make All The Different upvc windows near me
(Priscilla)
Guide To Birth Defect Attorney: The Intermediate Guide Towards Birth Defect Attorney Birth Defect
5 Killer Quora Answers On Uk Online Grocery Shopping Sites Uk online Grocery shopping sites
15 Secretly Funny People Working In Cerebral Palsy Law cerebral Palsy attorneys
20 Myths About Slot Design: Dispelled wild slots (https://telegra.Ph/)
Guide To Double Glazing Repairs Near Me: The Intermediate Guide On Double
Glazing Repairs Near Me Double Glazing Repairs Near Me
Five Killer Quora Answers To Best Online Shopping Websites Uk best online shopping websites
uk – 83.Viromin.Com –
This Is How Rewriter Text Will Look Like In 10 Years’ Time
Ai To Rewrite Articles; https://Seznamka.Blindr.Eu,
7 Helpful Tips To Make The Most Out Of Your Double Glazing Windows Crawley Window repairs
Although Asbestos legal is still banned
numerous legislative proposals for incremental legislation have been tossed around
Congress. One of these is the Frank R.
The Reasons Door Repairs Near Me Is Everyone’s Obsession In 2023 upvc Door repairs near me
Concluded Reading a Blog Post: A Formal Feedback to the Comment Section and an Invitation to Join “KING855”
‘After extensively studying the blog post,
I would like to furnish the following response to the comment .
Your insights regarding the topic were quite intellectually stimulating
. I found myself in concurrence with several of the ideas
you raised .
It is encouraging to see such an engaging exchange taking
place .
If you are interested in deeper examining this issue , I would
warmly urge you to join the “KING855” community
. In that space, you will have the opportunity to interact with like-minded individuals and dive deeper into these fascinating
subjects.
I am convinced your contribution would be a significant enhancement to the discussion .
Appreciate your remarks, and I anticipate the possibility
of continuing this enriching dialogue .
My web page – online casino bonuses
The People Who Are Closest To Motor Vehicle Lawyers Uncover Big Secrets motor vehicle accident law firms
Upvc Windows Near Me Tools To Ease Your Daily Lifethe One Upvc Windows Near Me
Trick Every Individual Should Know upvc windows near me (http://www.liquiddinamik.liquidmaps.org)
A Provocative Rant About Door Fitters High Wycombe french doors high wycombe