SMALL
//특수문자 제거 하기
public
static
String StringReplace(String str){
String match =
"[^\uAC00-\uD7A3xfe0-9a-zA-Z\\s]"
;
str =str.replaceAll(match,
" "
);
return
str;
}
//이메일 유효성 public static boolean isEmailPattern(String email){ Pattern pattern=Pattern.compile( "\\w+[@]\\w+\\.\\w+" ); Matcher match=pattern.matcher(email); return match.find(); }
|
//연속 스페이스 제거
public
static
String continueSpaceRemove(String str){
String match2 =
"\\s{2,}"
;
str = str.replaceAll(match2,
" "
);
return
str;
}
LIST
'Java' 카테고리의 다른 글
java 생년월일로 나이계산하기~ (0) | 2018.01.16 |
---|---|
톰켓 JSP Parameter 한글 깨짐 (0) | 2017.09.28 |
java Mail 파일저장 (0) | 2015.08.31 |
java Mail Part1 ,, java Mail 소개 (0) | 2015.06.24 |
자바 형변환 (0) | 2015.05.14 |