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 } }
We still cannot quite believe that We possibly could come to be some checking important points available your webblog. Our family i are sincerely thankful with your generosity and then for giving me possibility pursue our chosen profession path. Just right information Manged to get in your web-site.
The Hidden Secrets Of Bunk Beds Edda Fay
5 Killer Quora Answers To Popular Casino Slots popular casino slots (https://57.Farcaleniom.com)
What Is The Secret Life Of Americanfridge Freezer Zack Foxworth
Free Spin Slots The Process Isn’t As Hard As You Think Slot Bonuses
11 Methods To Redesign Completely Your Cerebral Palsy Claim cerebral palsy
law firms (Hg3b25hm0h.com)
i am addicted to computer games that is why i bought a gamecube for me and my brother,.
May I just say what a relief to locate somebody that actually understands what exactly theyre speaking about on the net. You definitely understand how to bring a problem to light and make it important. Lots more people should read this and appreciate this side of the story. I cannot believe you are not more popular because you definitely hold the gift.
What You Should Be Focusing On Improving Double Glazed
Units Near Me installer
The Motive Behind Birth Injury Lawyer Is Everyone’s Passion In 2023 birth injury Lawsuit
Thanks for sharing excellent informations. Your site is so cool. I am impressed by the details that you?ve on this website. It reveals how nicely you perceive this subject. Bookmarked this website page, will come back for more articles. You, my friend, ROCK! I found just the information I already searched all over the place and simply could not come across. What an ideal web-site.
This Is The History Of Fridge Freezer On Sale In 10 Milestones Mario Trace
5 Killer Quora Answers To Trik Sweet Bonanza trik Sweet bonanza
Online Shopping Sites List For Clothes Tools To Make Your Daily
Life Online Shopping Sites List For Clothes Trick Every Person Should Be Able To
2 Pc Standard Pillowcases
I uncovered your blog post to be a stimulating and
astute examination of the current state of the field .
Your appraisal of the crucial changes and challenges
grappling with organizations in this domain was unusually
compelling .
As an avid proponent of this issue , I would be pleased to expand this conversation more thoroughly .
If you are willing, I would cordially entreat you to
discover the electrifying prospects open at WM CASINO.
Our system offers a sophisticated and safe setting for interacting with compatible enthusiasts and
procuring a abundance of information to bolster your
familiarity of this dynamic realm . I eagerly await the likelihood of teaming up with
you in the approaching time
my web site – play online casino
12 Who Owns CSGO Facts To Get You Thinking About The Cooler.
Cooler cs2
Car Accident Law: What’s The Only Thing Nobody Is Talking About Motor Vehicle
Ten Dangerous Drugs Lawsuits That Really Help You Live Better Dangerous drugs lawsuits
The 10 Scariest Things About Upvc Windows Repairs
Upvc windows repairs (M.wwe.Maybins.co.kr)
Why You Should Concentrate On Enhancing Car Boot Scooter
Arlen Nizo
The 10 Most Terrifying Things About Classic Casino Slots classic casino slots
Why Adding Play Casino Slots To Your Life Can Make All The The Difference Slot Games
10 Things Your Competitors Can Learn About CSGO Battle Case Offensive weapon
hi, I am havin a tough time trying to rank up for the words “victorias secret coupon codes”… Please approve my comment!!
Help ! WikiLeaks is an multinational new media non-profit social group that publishes submissions of otherwise unavailable documents from nameless news sources and news leaks. Its website
What Is The Reason? Audi Key Replacement Is Fast Becoming The Trendiest Thing
Of 2023 audi key shell (Nannette)
9 Things Your Parents Teach You About Treehouse Beds Treehouse bed
15 Interesting Hobbies That Will Make You More Successful At Workers Compensation Legal workers’ compensation Attorneys
The History Of Windows Repair double glazed Window repairs near me
When I originally commented I clicked the -Notify me when new comments are added- checkbox and now when a comment is added I get four emails sticking with the same comment. Could there be in any manner you are able to remove me from that service? Thanks!