Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Tags
- react
- isSquare
- codewars
- react hook
- custom hook
- manifest.json
- TABLESPACE
- Debug
- JDBC
- descendingOrder
- java api
- TypeScript
- IBM
- DB2
- codewar
- useEffect
- type
Archives
- Today
- Total
taesik
is valid phone number (regex) 본문
"(123) 456-7890" => true
"(1111)555 2345" => false
"(098) 123 4567" => false
function validPhoneNumber(phoneNumber){
return /^\(\d{3}\) \d{3}\-\d{4}$/.test(phoneNumber);
}
'functions and trick > typescript_javascript' 카테고리의 다른 글
| Tribonacci (0) | 2022.01.28 |
|---|---|
| temp (0) | 2022.01.26 |
| string replace using regex (0) | 2022.01.26 |
| isValidIP (0) | 2022.01.26 |
| makes this string uppercasegives it sorted in alphabetical order by last name. (0) | 2022.01.25 |