[JAVA] 정규식 전화번호 마스킹 처리
정규식 패턴을 이용한 휴대폰, 일반전화 마스킹 처리 private final static Pattern phone_pattern = Pattern.compile("^(01[016789]\\D?)(\\d{3,4})(\\D?\\d{4})$"); private final static Pattern tel02_pattern = Pattern.compile("^(02\\D?)(\\d{3,4})(\\D?\\d{4})$"); private final static Pattern tel_pattern = Pattern.compile("^(\\d{3}\\D?)(\\d{3,4})(\\D?\\d{4})$"); public static boolean isPhone(String phone) { Matcher matcher = p..
지식정보
2019. 7. 16. 10:18
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday