Regular Expressions 101

Community Patterns

Format Korean Mobile Number

0

Regular Expression
ECMAScript (JavaScript)

/
(?<countryCode>\+?82)?(?:[ -.]?|0?)(?<areaCode>1[01689])(?:[ -.]?)(?<firstFourDigits>\d{3,4})(?:[ -.]?)(?<lastFourDigits>\d{4})
/
gm

Description

대한민국 휴대폰 번호에서 국가번호(82), 지역번호(01X), 앞번호3-4자리, 뒷번호 4자리를 countyCode, areaCode, firstFourDigits, lastFourDigits로 Mapping

Submitted by anonymous - 4 years ago