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 } }
I have assiduously reveled in the commentary provided in this reflective blog discourse.
The wordsmith has poetically voiced several essential themes that echo with
me deeply .
As an passionate advocate of pioneering commercial
undertakings , I would intend to offer an solicitation to you to examine the unparalleled
avenues available at Pragmatic Play.
This vibrant establishment is at the leading
edge of technological transformations , affording a
effervescent and valuable atmosphere for persons
who possess a enthusiasm for superiority and a tenacity to
advance the parameters of what is practicable .
I exhort you to reflect on this recommendation and discover the wealth
of openings that present themselves . Please be at liberty to
get in touch if you have any questions or would aim to
ponder over in greater detail .
Warmest blessings,
Feel free to visit my blog post :: online casino player behavior analytics
https://prednisolone.pro/# prednisone 2.5 mg tab
Where Will 3 Bunk Bed One Year From What Is Happening Now?
corner Triple bunk bed
cheap Rybelsus 14 mg: cheap Rybelsus 14 mg – buy semaglutide online
buy ventolin online cheap: order ventolin from canada no prescription – ventolin tablet price
prednisone purchase online: prednisone 20 mg purchase – prednisone for dogs
{Tôi đã hạnh phúc hơn cả vui để tìm thấy trang web tuyệt vời này. Tôi muốn cảm ơn bạn {vì đã|dành thời gian cho|chỉ vì điều này|vì điều này|cho bài đọc tuyệt vời này!! Tôi chắc chắn đánh giá cao từng một chút nó và tôi đã đã đánh dấu trang để xem điều mới trên trang web của bạn.|Tôi có thể chỉ nói rằng thật thoải mái để tìm thấy một người mà thực sự biết họ là gì đang nói về trên mạng. Bạn chắc chắn biết cách đưa một vấn đề ra ánh sáng và làm cho nó trở nên quan trọng. Nhiều người hơn phải đọc điều này và hiểu khía cạnh này câu chuyện của bạn. Tôi đã ngạc nhiên bạn không nổi tiếng hơn vì bạn chắc chắn nhất có món quà.|Rất hay bài viết. Tôi hoàn toàn đánh giá cao trang web này. Cảm ơn!|Thật khó đến những người có kinh nghiệm về điều này, tuy nhiên, bạn nghe có vẻ bạn biết mình đang nói gì! Cảm ơn|Bạn cần là một phần của một cuộc thi dành cho một trang web trên web tốt nhất. Tôi sẽ khuyến nghị trang web này!|Một hấp dẫn chắc chắn đáng giá bình luận. Tôi tin rằng bạn nên xuất bản thêm về chủ đề này, nó có thể không là một điều cấm kỵ vấn đề nhưng điển hình mọi người không thảo luận vấn đề những điều này. Đến phần tiếp theo! Chúc mọi điều tốt đẹp nhất.|Chào bạn! Tôi chỉ muốn cho bạn một rất cho thông tin tuyệt vời bạn có ở đây trên bài đăng này. Tôi sẽ là trở lại trang web của bạn để biết thêm thông tin sớm nhất.|Sau khi tôi ban đầu bình luận tôi có vẻ như đã nhấp vào hộp kiểm -Thông báo cho tôi khi có bình luận mới- và bây giờ mỗi lần được thêm vào tôi nhận được 4 email cùng chính xác một bình luận. Có một phương pháp dễ dàng bạn có thể xóa tôi khỏi dịch vụ đó không? Cảm kích.|Lần sau Tôi đọc một blog, Hy vọng rằng nó sẽ không làm tôi thất vọng nhiều như bài này. Rốt cuộc, Vâng, đó là sự lựa chọn của tôi để đọc hết, dù sao thì tôi thực sự tin bạn sẽ có điều gì đó hữu ích để nói. Tất cả những gì tôi nghe được là một loạt rên rỉ về điều gì đó mà bạn có thể sửa nếu bạn không quá bận tìm kiếm sự chú ý.|Đúng với bài viết này, tôi thực sự nghĩ trang web này cần nhiều hơn nữa sự chú ý.
15 Best Documentaries On Add Women Adult Add In Women
ventolin for sale uk: Ventolin inhaler best price – ventolin cost australia
https://prednisolone.pro/# prednisone tabs 20 mg
http://rybelsus.tech/# Rybelsus 7mg
furosemide 40 mg: furosemide online – furosemide 100mg
ventolin australia: Ventolin inhaler price – ventolin pills
ventolin hfa: Ventolin inhaler best price – ventolin drug
lasix 100mg: lasix generic name – buy furosemide online
lasix 100 mg: cheap lasix – furosemide 40 mg
https://prednisolone.pro/# buy prednisone without a prescription best price
buying ventolin in usa: Ventolin inhaler price – buying ventolin in usa
Профессиональный сервисный центр по ремонту компьютеров и ноутбуков в Москве.
Мы предлагаем: ремонт macbook m1
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
lasix pills: buy furosemide – lasix 100mg
An outstanding share! I have just forwarded this onto a friend who was doing a little research on this. And he actually ordered me dinner simply because I discovered it for him… lol. So allow me to reword this…. Thank YOU for the meal!! But yeah, thanx for spending time to talk about this topic here on your web site.
neurontin pill: can you buy neurontin over the counter – generic neurontin cost
rybelsus cost: semaglutide – rybelsus generic
generic neurontin: neurontin 200 mg tablets – neurontin 300 mg cap
neurontin 300: neurontin capsules – neurontin 150 mg
rybelsus: rybelsus generic – cheap Rybelsus 14 mg
5 Laws That Anyone Working In Mental Health Assessment London Should Know prom assessment mental health, Christoper,
20 Resources To Help You Become Better At Skoda Replacement Key
Near Me Lost Skoda Key (Pennswoodsclassifieds.Com)
how to buy prednisone online: prednisone 54899 – prednisone 2.5 mg daily
http://rybelsus.tech/# rybelsus