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 } }
пинап кз: пин ап казино онлайн – пин ап казино
pin up 306 pin up pin up 306
Тут делают продвижение создание сайтов для клиники разработка сайта медицинской клиники
Тут делают продвижение разработка сайта клиники разработка сайтов медицинских организаций
Тут делают продвижение стратегия с роботами стратегия с роботами
Тут делают продвижение сео продвижение медицинского сайта медицинский seo
пин ап зеркало пин ап казино pin up
25 Surprising Facts About Lost Spare Car Key lost my spare car key
пинап кз http://pinupru.site/# pin up зеркало
пинап кз
пин ап: пин ап 634 – пин ап кз
пин ап казино онлайн: пин ап казахстан – pin up
A motivating discussion is worth comment. I believe that you ought to publish more on this topic, it may not be a taboo matter but usually people do not speak about these subjects. To the next! Best wishes.
пин ап казино онлайн http://pinupru.site/# пинап казино
пин ап
http://pinupkz.tech/# pin up kz
Why People Don’t Care About Kia Picanto Spare Key kia keys
pin up pin-up casino giris pin up az
Have a look at my blog post :: Daycares popular listings
10 Easy Steps To Start The Business Of Your Dream Renault Clio Key Business Renault kadjar Key card Cover
Starting Story Marketing Campaign – A Chronological Checklist 검색엔진최적화 업체
http://pinupkz.tech/# пин ап 634
Three Reasons Why You’re Wall Mounted Electric Fires Is Broken (And How To Repair It) Best electric wall Fireplace
В магазине сейфов предлагают взломостойкий сейф взломостойкий сейф
pin-up casino giris pin up casino giris pin up giris
Intriguing and discerning analysis of the content.
Your evaluation was comprehensive and well-researched,
furnishing participants with a thorough appreciation of the principal
concerns at fingertips.
I would overjoyed to collaborate supplemental on this subject.
If you consent, I would kindly urge you to become a
member of me on the SBOBET ecosystem, where we might prolong our
debate in a even more immersive environment.
Look into my website Innovative gaming content
pin up azerbaijan: pin up az – pinup az
пин ап казахстан https://pinupru.site/# pin up
пинап казино
pin-up casino: pin up – pin-up bonanza
pin up казино http://pinupkz.tech/# пин ап казино
пин ап казахстан
https://pinupru.site/# пинап казино
pin up casino giris: pin up – pin up giris