• Y
  • List All
  • Feedback
    • This Project
    • All Projects
Profile Account settings Log out
  • Favorite
  • Project
  • All
Loading...
  • Log in
  • Sign up
chominsoo4245 / mjon_git star
Forked from hylee / mjon_git
  • Project homeH
  • CodeC
  • IssueI
  • Pull requestP
  • Review R
  • MilestoneM
  • BoardB
  • Files
  • Commit
  • Branches
mjon_gitsrcmainjavaitnletmjomsgdataservicePhoneVO.java
Download as .zip file
File name
Commit message
Commit date
DATABASE
mjon_git
2023-06-12
src/main
Merge branch 'master' of http://hylee@vcs.iten.co.kr:9999/hylee/mjon_git
2023-07-03
.codetogether.ignore
mjon_git
2023-06-12
.gitignore
gitignore 적용
2023-06-12
pom.xml
mjon_git
2023-06-12
File name
Commit message
Commit date
java
Merge branch 'master' of http://hylee@vcs.iten.co.kr:9999/hylee/mjon_git
2023-07-03
resources
등급제 일괄변경 작업중
2023-06-30
webapp
등급제 일괄변경 작업중
2023-06-30
File name
Commit message
Commit date
egovframework
mjon_git
2023-06-12
itn
Merge branch 'master' of http://hylee@vcs.iten.co.kr:9999/hylee/mjon_git
2023-07-03
File name
Commit message
Commit date
com
feat: pms-#3232 [관리자] 스케쥴에 의해 IP 차단 시 슬렉 알림 추가 완료
2023-07-03
let
Merge branch 'wyh'
2023-07-03
web
전용계좌 첫결제시 스미싱알림 처리
2023-06-26
File name
Commit message
Commit date
cop
bbsId를 변조해서 공지사항에 글 등록 방지 처리
2023-06-20
crypto/web
mjon_git
2023-06-12
fax
팩스전송화면 비로그인시 오픈처리
2023-06-15
hangulparser
mjon_git
2023-06-12
kakao
알림톡 채널 생성일, 등록일 구분 추가
2023-06-30
komoran
mjon_git
2023-06-12
lett
mjon_git
2023-06-12
mail
mjon_git
2023-06-12
main
mjon_git
2023-06-12
mjo
요금결제내역 간편결제 기능 추가후 주석처리
2023-06-29
module/base
mjon_git
2023-06-12
org
mjon_git
2023-06-12
schdlr/service
전용계좌 첫결제시 스미싱알림 처리
2023-06-26
sec
mjon_git
2023-06-12
solr
mjon_git
2023-06-12
sts
mjon_git
2023-06-12
sym
Merge branch 'wyh'
2023-07-03
uat
B선 전송사 이용고객 => 이벤트대상 제외처리
2023-06-22
uss
회원 탈퇴자 관리 통계 추가
2023-06-26
utl
mjon_git
2023-06-12
File name
Commit message
Commit date
addr
mjon_git
2023-06-12
addragency
mjon_git
2023-06-12
apikey
2023-06-21 15:10 API KEY 사용자 생성 수정
2023-06-21
block
mjon_git
2023-06-12
cert
mjon_git
2023-06-12
conf
문자전송시 B라인 운영여부 체크
2023-06-21
dwn/web
mjon_git
2023-06-12
event
결제하기 간편결제 추가
2023-06-29
kisa
mjon_git
2023-06-12
mjocommon
mjon_git
2023-06-12
msg
Merge branch 'master' of http://dudgusw@vcs.iten.co.kr:9999/hylee/mjon_git
2023-06-21
msgCustom
mjon_git
2023-06-12
msgagent
전용전송사 변경시 관리자메모 추가
2023-06-20
msgcampain
mjon_git
2023-06-12
msgdata
문자전송시 B라인 운영여부 체크
2023-06-21
msgsent
mjon_git
2023-06-12
pay
요금결제내역 간편결제 기능 추가후 주석처리
2023-06-29
paykgm/service
mjon_git
2023-06-12
payva
mjon_git
2023-06-12
rejt
mjon_git
2023-06-12
reservmsg
발송전송 취소 및 승인
2023-06-20
scheduler/service
mjon_git
2023-06-12
spammsg
mjon_git
2023-06-12
sttst/service
mjon_git
2023-06-12
symbol
mjon_git
2023-06-12
tax
mjon_git
2023-06-12
temp/service
mjon_git
2023-06-12
test
mjon_git
2023-06-12
File name
Commit message
Commit date
service
B라인 전송 및 예약취소 기능 추가
2023-06-19
web
문자전송시 B라인 운영여부 체크
2023-06-21
File name
Commit message
Commit date
impl
B라인 전송 및 예약취소 기능 추가
2023-06-19
JsonResult.java
mjon_git
2023-06-12
MjonMsgDataService.java
mjon_git
2023-06-12
MjonMsgDataVO.java
mjon_git
2023-06-12
MjonMsgReturnVO.java
mjon_git
2023-06-12
PhoneVO.java
mjon_git
2023-06-12
hylee 2023-06-12 445fc82 mjon_git UNIX
Raw Open in browser Change history
package itn.let.mjo.msgdata.service; import java.io.Serializable; import java.util.regex.Matcher; import java.util.regex.Pattern; import itn.com.cmm.util.StringUtil; /** * 전화번호 모델 * - 2018-06-22<br> * > 정규식으로 변경<br> * > 4번째 자리 번호 제외<br> * > 하이픈 제거 getter 추가<br> * * @author wimy * */ public class PhoneVO implements Serializable{ private static final long serialVersionUID = -3298463449590604490L; /** * 전화번호 판단 정규식 : 국내 전화번호 규칙 사용 */ public static final String _REG_EXP_PHONE = "(^02.{0}|^01.{1}|^0[0-9]{2})-?([0-9]{3,4})-?([0-9]{4})$"; /** * 8자리 전화번호 */ public static final String _REG_EXP_PHONE_8 = "(^1[0-9]{3})-?([0-9]{4})$"; private String no; private String Name; private String no1 = ""; private String no2 = ""; private String no3 = ""; //private String no4 = ""; public String getNo() { if (this.no == null) this.splitPhone(); return this.no; } public void setNo(String no) { this.no = no; this.splitPhone(); } /** * [읽기전용] 하이픈 제거된 전화번호 * @return */ public String getNoWithoutHyphen() { return this.getNo().replaceAll("-", ""); } /** * split no number */ private void splitPhone() { if (this.no == null) this.no = ""; if (this.no.equals("") && !StringUtil.isEmpty(this.no1) && !StringUtil.isEmpty(this.no2) && !StringUtil.isEmpty(this.no3)) this.no = this.no1 + this.no2 + this.no3; Pattern pattern = Pattern.compile(_REG_EXP_PHONE); Matcher match = pattern.matcher(this.no); if (match.find()) { this.no = match.replaceAll("$1-$2-$3"); String[] arr = this.no.split("-"); //8자리 전화번호 if (arr[1].length() == 1) { Pattern pattern2 = Pattern.compile(_REG_EXP_PHONE_8); Matcher match2 = pattern2.matcher(this.no.replaceAll("[^\\d]", "")); if (match2.find()) { this.no = match2.replaceAll("$1-$2"); String[] arr2 = this.no.split("-"); this.setNo1(""); this.setNo2(arr2[0]); this.setNo3(arr2[1]); } else { this.no = ""; this.setNo1(""); this.setNo2(""); this.setNo3(""); } } else { this.setNo1(arr[0]); this.setNo2(arr[1]); this.setNo3(arr[2]); } } else { Pattern pattern2 = Pattern.compile(_REG_EXP_PHONE_8); Matcher match2 = pattern2.matcher(this.no.replaceAll("[^\\d]", "")); if (match2.find()) { this.no = match2.replaceAll("$1-$2"); String[] arr2 = this.no.split("-"); this.setNo1(""); this.setNo2(arr2[0]); this.setNo3(arr2[1]); } else { this.no = ""; this.setNo1(""); this.setNo2(""); this.setNo3(""); } } } /** * @return no1 */ public String getNo1() { return this.no1; } /** * @param no1 */ public void setNo1(String no1) { this.no1 = no1; } /** * @return no2 */ public String getNo2() { return this.no2; } /** * @param no2 */ public void setNo2(String no2) { this.no2 = no2; } /** * @return no3 */ public String getNo3() { return this.no3; } /** * @param no3 */ public void setNo3(String no3) { this.no3 = no3; } public String getName() { return Name; } public void setName(String name) { Name = name; } // /** // * @return no4 // */ // public String getNo4() { // if (no4 == null) // splitPhone(); // return this.no4; // } // // /** // * @param no4 // */ // public void setNo4(String no4) { // this.no4 = no4; // } }

          
        
    
    
Copyright Yona authors & © NAVER Corp. & NAVER LABS Supported by NAVER CLOUD PLATFORM

or
Sign in with github login with Google Sign in with Google
Reset password | Sign up