일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 |
Tags
- springboot
- ubuntu
- AWS
- Spring Batch
- it
- javascript
- tool
- jsp
- elasticsearch
- IntelliJ
- devops
- Spring Boot
- Spring
- 요리
- Web Server
- Oracle
- JVM
- Git
- MySQL
- java
- linux
- db
- ReactJS
- laravel
- redis
- Gradle
- php
- Design Patterns
- 맛집
- jenkins
Archives
- Today
- Total
아무거나
연속된 4자리 숫자 중복 체크 본문
반응형
const pinCode = '211112'
if (/(\w)\1\1\1/.test(pinCode)) {
console.log('4자리 이상 연속된 중복 문자 있음')
} else {
console.log('4자리 이상 연속된 중복 문자 없음')
}
// 결과: '4자리 이상 연속된 중복 문자 있음'
반응형
'Javascript & HTML & CSS > Javascript' 카테고리의 다른 글
[NPM] error can't find python executable python you can set the python env variable mac 오류해결 (0) | 2022.04.18 |
---|---|
[yarn] yarn 관련 명령 (0) | 2020.06.06 |
객체에 key/value 추가 (0) | 2020.03.21 |
[Yarn] ESOCKETTIMEDOUT on 31 MB package material-design-icons 에러 해결 (0) | 2020.03.20 |
input type="number" 일 때 maxlength 설정 (0) | 2019.12.24 |
Comments