국가 번호 코드까지 입력할 수 있게 핸드폰 번호를 받자
^\s*(?:\+?(\d{1,3})[-. (]*)?\s*((01[016789]{3})[-. )]*)?((\d{3,4})[-. ]*)+(\d{4})+\s*$
+82 010 0000 0000
82 010 0000 0000
8201000000000
+82 010-0000-0000
82 010-0000-0000
^ the beginning of the string
\s white space
* quantifier 0 or more of the preceding token
(?:) Non-capturing group - multiple tokens together without creating a capture group
\+ Escaped, matches a +
? quantifier 0 or 1 of the preceding token
() capturing group #1 creates a capture group of extracting a substring or using a backreference
\d digit (0-9)
{1,3} quantifier between 1 and 3
[] character set
+ quantifer 1 or more
$ the end of the string