문자수신 휴대폰 번호 체크 메소드 추가

main
이범준 1 week ago
parent afc3512e17
commit 1d10c17727

@ -102,6 +102,15 @@ public class CmmnUtil {
return Pattern.matches(REGEXP_PATTERN_KOR, str); return Pattern.matches(REGEXP_PATTERN_KOR, str);
} }
/**
* .
* @param
* @return boolean
*/
public static boolean isReceivePhone(String str) {
String REGEXP_SENDABLE_PHONE = "^(010)\\d{7,8}$";
return Pattern.matches(REGEXP_SENDABLE_PHONE, str);
}
/** /**
* . * .
@ -109,7 +118,6 @@ public class CmmnUtil {
* @return String * @return String
*/ */
public static String extractCarNumber(String carNum){ public static String extractCarNumber(String carNum){
//String returnStr = "";
try{ try{
String regex = "[서울|부산|대구|인천|대전|광주|울산|제주|경기|강원|충남|전남|전북|경남|경북|세종]{2}\\d{2}[가|나|다|라|마|거|너|더|러|머|버|서|어|저|고|노|도|로|모|보|소|오|조|구|누|두|루|무|부|수|우|주|바|사|아|자|허|배|호|하\\x20]\\d{4}"; String regex = "[서울|부산|대구|인천|대전|광주|울산|제주|경기|강원|충남|전남|전북|경남|경북|세종]{2}\\d{2}[가|나|다|라|마|거|너|더|러|머|버|서|어|저|고|노|도|로|모|보|소|오|조|구|누|두|루|무|부|수|우|주|바|사|아|자|허|배|호|하\\x20]\\d{4}";

Loading…
Cancel
Save