일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Windows 10
- Mac
- lsof
- tomcat
- Windows
- find
- context
- xargs
- 줄바꿈 문자
- profile
- Source
- netsh
- 단축키
- IntelliJ
- resource
- bash
- VirtualBox
- plugin
- vscode
- port
- JavaScript
- GIT
- import
- web.xml
- ssh
- grep
- 네트워크
- Quartz
- Eclipse
- maVen
- Today
- Total
목록Dev/Java (163)
develog
import java.util.regex.Matcher;import java.util.regex.Pattern; public class TestMain { public static void main(String[] args) {System.out.println("START");System.out.println("-------------------------------------");String str = "본문 영역으로 바로가기";System.out.println("str : " + str);String regex = "";Pattern pattern = Pattern.compile(regex);Matcher matcher = pattern.matcher(str); String ret = null;whi..
code // remove style block str = str.replaceAll("",""); // remove script block str = str.replaceAll("",""); // remove html tag str = str.replaceAll("]*>",""); // remove html entity str = str.replaceAll("&[^;]+;",""); before 본문 영역으로 바로가기 after 본문 영역으로 바로가기
public class CollectionUtil { public static void sort(List list, String keyNm) { sort(list, keyNm, false); } public static void sort(List list, String keyNm, boolean descOrder) { Comparator comparator = new ListMapComparator(keyNm); Collections.sort(list, comparator); if (descOrder) { Collections.reverse(list); } }} class ListMapComparator implements Comparator { private String keyNm; public Lis..
Web scraper open sourcehttp://thewebscraping.com/web-scraper-open-source-3/ Web Page Scraping using Javahttp://half-wit4u.blogspot.kr/2011/01/web-scraping-using-java-api.html
public class CollectionUtil { public static void sort(List list, String keyNm) { sort(list, keyNm, false); } public static void sort(List list, String keyNm, boolean descOrder) { Comparator comparator = new ListMapComparator(keyNm); Collections.sort(list, comparator); if (descOrder) { Collections.reverse(list); } } } class ListMapComparator implements Comparator { private String keyNm; public Li..