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 } }
Профессиональный сервисный центр по ремонту планшетов в том числе Apple iPad.
Мы предлагаем: сервис по ремонту ipad
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
Профессиональный сервисный центр по ремонту планшетов в том числе Apple iPad.
Мы предлагаем: сервис ipad москва
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
canadian online drugs: canadian mail order pharmacy – canadian pharmacy sarasota
pay per click programs are really great, i could earn some decent cash from it..
http://canadapharma.shop/# best canadian online pharmacy reviews
mexican drugstore online: best online pharmacies in mexico – mexico drug stores pharmacies
http://canadapharma.shop/# best online canadian pharmacy
“Ask Me Anything:10 Answers To Your Questions About Togel Singapore togel hongkong
world pharmacy india indian pharmacy reputable indian pharmacies
п»їlegitimate online pharmacies india: online Indian pharmacy – mail order pharmacy india
See What Car Key Programmer Near Me Tricks The Celebs Are Using car key programmer near me – Shavonne,
I truly appreciate this post. I have been looking everywhere for this! Thank goodness I found it on Bing. You have made my day! Thank you again
mexico drug stores pharmacies: pharmacies in mexico that ship to usa – medicine in mexico pharmacies
canadian pharmacy 24h com Canadian Pharmacy my canadian pharmacy
Профессиональный сервисный центр по ремонту гироскутеров в Москве.
Мы предлагаем: посмотреть состояние аккумулятора
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
Профессиональный сервисный центр по ремонту моноблоков в Москве.
Мы предлагаем: моноблоки недорого
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
This is the right site for anybody who would like to find out about this topic. You understand so much its almost tough to argue with you (not that I personally would want to…HaHa). You certainly put a new spin on a topic that has been written about for ages. Wonderful stuff, just wonderful.
canadian drug prices Online medication home delivery canadian drugs online
http://mexicanpharma.icu/# best online pharmacies in mexico
https://mexicanpharma.icu/# best online pharmacies in mexico
mexico drug stores pharmacies medication from mexico buying prescription drugs in mexico online
Профессиональный сервисный центр по ремонту кондиционеров в Москве.
Мы предлагаем: срочный ремонт кондиционеров
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
best online pharmacies in mexico: mexican pharma – buying prescription drugs in mexico online
ed drugs online from canada: Cheapest online pharmacy – online canadian pharmacy review
The provided material of this blog entry
is really captivating . I enjoyed the way you analyzed the numerous issues so thoroughly
and clearly . You helped me acquire fresh outlooks that I never contemplated before.
Thank you for disseminating your mastery and expertise – it has equipped me to improve myself more .
I especially liked the innovative standpoints you showcased , which expanded my awareness and
thinking in meaningful trajectories . This blog is
well-structured and enthralling, which is fundamental for
subject matter of this quality.
I hope to read further of your creations in the times ahead , as I’m assured it is sure to continue to
be educational and assist me continue developing . I
offer my appreciation !
Stop by my web site the most popular online casino games; http://bbs.maibu.cc/space-uid-532618.html,
indian pharmacy paypal: indian pharmacy – buy prescription drugs from india
http://canadapharma.shop/# canadian pharmacy ltd
india pharmacy mail order: Indian pharmacy online – Online medicine home delivery
An interesting discussion is definitely worth comment. There’s no doubt that that you should write more about this issue, it may not be a taboo subject but typically people do not talk about these issues. To the next! Cheers.
reputable canadian online pharmacy canadian pharmacy 24 com my canadian pharmacy reviews