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 } }
การตีกลับออนไลน์ช่วยให้คุณเชื่อมต่อกับโลกได้!
ด้วยการออกแบบเว็บไซต์ที่ทันสมัยและบริการด้านการตลาดดิจิทัล คุณสามารถเข้าถึงลูกค้า เพิ่มยอดขาย และทำให้ธุรกิจของคุณเติบโตได้ มาร่วมกับเราและใช้ประโยชน์จากการใช้งานง่ายของเรา
Here is my web blog :: เว็บพนันคาสิโนออนไลน์
http://edpills.men/# erectile dysfunction medicine online
online prescription for ed: cheap ed treatment – affordable ed medication
buy Kamagra: super kamagra – Kamagra 100mg price
semaglutide tablets: semaglutide best price – buy rybelsus online
Purchase Cenforce Online: buy cenforce – cenforce
https://drugs1st.pro/# drugs1st
Cenforce 150 mg online cenforce for sale buy cenforce
http://drugs1st.pro/# viagra without doctor prescription amazon
I have assiduously relished the observations provided in this enlightening blog commentary .
The wordsmith has fluently expounded several key themes that
echo with me strongly .
As an enthusiastic advocate of cutting-edge corporate projects , I would intend to propose an recommendation to
you to delve into the unparalleled chances available at Pragmatic Play .
This vibrant company is at the cutting
edge of technological developments , supplying a energetic and
enriching environment for enthusiasts who exhibit
a zeal for preeminence and a grit to
elevate the frontiers of what is attainable .
I implore you to consider this appeal and
investigate the profusion of openings that await . Please
feel free to contact if you have any doubts or would yearn to
deliberate on in more depth .
Most respectful regards ,
Feel free to visit my web-site: online casino data analytics, Connor,
https://kamagra.men/# п»їkamagra
https://edpills.men/# ed drugs online
cenforce: Cenforce 100mg tablets for sale – order cenforce
http://kamagra.men/# cheap kamagra
ed meds online without doctor prescription: best ed pills non prescription – how to get prescription drugs without doctor
The details of Deus Ex – plot, character, game system design – all modified radically since the times of Troubleshooter and manifestos and guidelines and guidelines addenda, however conceptually the sport nonetheless follows most of the rules and meets the ideals outlined in the sport Developer article.
The assault in opposition to Cartagena, in March-April 1741, proved a catastrophe, as over half of the British power fell sick and died of tropical diseases, mainly yellow fever.
online ed pharmacy best online ed treatment best online ed treatment
Entry to download over 3,seven hundred e-books with resale proper.
He married Ina Mae ESTLE, Sept.
In 1829, European Individuals found gold close to Dahlonega, Georgia, starting the first gold rush within the United States.
drugs1st drugs1st erectile dysfunction remedies
A demo was launched on February 4, 2012, which featured 4 playable characters over a 20-12 months span.
Preparations for the attack began immediately, on December 23.
In 2011, Universal Studios Singapore started their Halloween Horror Nights occasion.
There are numerous creators who don’t wish to deal with fans, and truthfully mustn’t.
https://kamagra.men/# Kamagra 100mg price
cheap semaglutide pills semaglutide tablets for weight loss semaglutide tablets store
http://kamagra.men/# Kamagra 100mg price
http://edpills.men/# online ed medicine