Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- Mac
- netsh
- context
- 줄바꿈 문자
- JavaScript
- web.xml
- Eclipse
- 단축키
- find
- Source
- resource
- import
- xargs
- 네트워크
- IntelliJ
- Windows
- port
- maVen
- VirtualBox
- profile
- Windows 10
- tomcat
- bash
- GIT
- ssh
- vscode
- lsof
- Quartz
- grep
- plugin
Archives
- Today
- Total
develog
[java] html tag 제거 본문
code
// remove style block
str = str.replaceAll("<style[^>]*>[^<]*</style>","");
// remove script block
str = str.replaceAll("<script[^>]*>[^<]*</script>","");
// remove html tag
str = str.replaceAll("<[^>]*>","");
// remove html entity
str = str.replaceAll("&[^;]+;","");
before
<a href="javascript:void(0);" onclick="skip_navigation('content');">
<span>본문 영역으로 바로가기</span>
</a>
after
본문 영역으로 바로가기
'Dev > Java' 카테고리의 다른 글
[Java] log4j, add appender in source code (0) | 2013.05.29 |
---|---|
정규표현식 #1 (0) | 2013.05.26 |
Collection List<Map> sort (0) | 2013.05.16 |
Web scraper open source (0) | 2013.05.16 |
Collection List<Map> sort (0) | 2013.05.16 |