From 1d10c177275103d67d1a927af799e18a935159bd Mon Sep 17 00:00:00 2001 From: leebj Date: Tue, 5 Nov 2024 17:45:13 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AC=B8=EC=9E=90=EC=88=98=EC=8B=A0=20?= =?UTF-8?q?=ED=9C=B4=EB=8C=80=ED=8F=B0=20=EB=B2=88=ED=98=B8=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=20=EB=A9=94=EC=86=8C=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cokr/xit/fims/cmmn/CmmnUtil.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/cokr/xit/fims/cmmn/CmmnUtil.java b/src/main/java/cokr/xit/fims/cmmn/CmmnUtil.java index d007ce7c..37c5beef 100644 --- a/src/main/java/cokr/xit/fims/cmmn/CmmnUtil.java +++ b/src/main/java/cokr/xit/fims/cmmn/CmmnUtil.java @@ -102,6 +102,15 @@ public class CmmnUtil { 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 차량번호 */ public static String extractCarNumber(String carNum){ - //String returnStr = ""; try{ String regex = "[서울|부산|대구|인천|대전|광주|울산|제주|경기|강원|충남|전남|전북|경남|경북|세종]{2}\\d{2}[가|나|다|라|마|거|너|더|러|머|버|서|어|저|고|노|도|로|모|보|소|오|조|구|누|두|루|무|부|수|우|주|바|사|아|자|허|배|호|하\\x20]\\d{4}";