일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
- 초기 세팅
- React
- header setting
- Next.js 14
- JPA
- CentOS6
- jpa entity자동
- generate pojos
- Java
- generate entity
- JavaScript
- spring
- swagger
- java8
- SpringBoot
- 초기 구축
- docker
- NextJS
- spring boot
- 리눅스
- ollama langflow
- docker 설치
- 헤더 설정
- MySQL
- jvm
- memcached
- custom valid
- java9
- dto valid
- 도커
- Today
- Total
개발자의 길
[자바스크립트] 정규식 모음 본문
Date Format (m/d/y) ^([\d]|1[0,1,2])/([0-9]|[0,1,2][0-9]|3[0,1])/\d{4}$ 12/21/2005
Decimal Number ^\d*[0-9](\.\d*[0-9])?$ 234.342
Document Filenames ^[a-zA-Z0-9-_\.]+\.(pdf|txt|doc|csv)$ world-domination.pdf
E-mail Address ^([0-9a-zA-Z]+([_.-]?[0-9a-zA-Z]+)*@[0-9a-zA-Z]+[0-9,a-z,A-Z,.,-]*(.){1}[a-zA-Z]{2,4})+$
HTML Color Codes ^#?([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?$ #00ccff
Image Filenames ^[a-zA-Z0-9-_\.]+\.(jpg|gif|png)$ new-pic_company.jpg
IP Address ^((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})$ 192.168.0.1
Multimedia Filenames ^[a-zA-Z0-9-_\.]+\.(swf|mov|wma|mpg|mp3|wav)$ company-presentation.swf
MySQL Date Format ^\d{4}-(0[0-9]|1[0,1,2])-([0,1,2][0-9]|3[0,1])$ 2005-09-02
Phone Number ^[2-9]\d{2}-\d{3}-\d{4}$ 250-555-4542
Postal Code (CAD) ^([A-Z][0-9]){3}$ V2B2S3
Time Format (HH:MM) ^([0-1][0-9]|[2][0-3])(:([0-5][0-9])){1,2}$ 12:29
URL ^(http[s]?://|ftp://)?(www\.)?[a-zA-Z0-9-\.]+\.(com|org|net|mil|edu|ca|co.uk|com.au|gov)$
Versatile Phone Number ^(([0-9]{1})*[- .(]*([0-9a-zA-Z]{3})*[- .)]*[0-9a-zA-Z]{3}[- .]*[0-9a-zA-Z]{4})+$ 1.245.532.3422
Credit Card Number [0-9]{13,16}
Diners Club Card ^([30|36|38]{2})([0-9]{12})$
ICQ UIN ([1-9])+(?:-?\d){4,}
Alpha-Numeric ^[a-zA-Z0-9]+$
Domain like "abc.de" ^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$
IPv4 Address ((^|\.)((25[0-5])|(2[0-4]\d)|(1\d\d)|([1-9]?\d))){4}$
IPv6 Address ((^|:)([0-9a-fA-F]{0,4})){1,8}$
Username with 2-20 chars (format: string+string|number) ^[a-zA-Z][a-zA-Z0-9-_\.]{1,20}$
Password (UpperCase, LowerCase and Number) ^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).*$
Password (UpperCase, LowerCase, Number/SpecialChar and min 8 Chars) (?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$
American Postal Code (format is nnnnn or nnnnn-nnnn) (\d{5}([\-]\d{4})?)
Canadian Postal Code (Format: A0A 0A0) ^([A-Za-z][0-9][A-Za-z] [0-9][A-Za-z][0-9])$
Australia Postal Code (Format: nnnn) ^[0-9]{4}$
Austrian Postal Code (Format: nnnn) ^[0-9]{4}$
Hungarian Postal Code (Format: nnnn) ^[0-9]{4}$
German Postal Code (Format: nnnnn) ^[0-9]{5}$
Swedish Postal Code (Format: nnnnn) ^[0-9]{5}$
Japanese Postal Code (Format: nnn-nnnn) ^\d{3}-\d{4}$
Spanish Postal Code (Format: 01xxx to 50xxx) ((0[1-9]|5[0-2])|[1-4][0-9])[0-9]{3}
Dutch Postal Code (Format: 1234 aa) ^[1-9][0-9]{3}\s?[a-zA-Z]{2}$
Date (Format: YYYY-MM-DD) [0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])
Full Date Validation (YYYY-MM-DD) (?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))
Date (Format: MM/DD/YYYY) (0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d
Full date validation (MM/DD/YYYY) (?:(?:0[1-9]|1[0-2])[\/\\-. ]?(?:0[1-9]|[12][0-9])|(?:(?:0[13-9]|1[0-2])[\/\\-. ]?30)|(?:(?:0[13578]|1[02])[\/\\-. ]?31))[\/\\-. ]?(?:19|20)[0-9]{2}
Latitude or Longitude -?\d{1,3}\.\d+
Price (Format: 1.00) \d+(\.\d{2})?
Price (Format: 1,00) \d+(,\d{2})?
Phone Number (Format: +99(99)9999-9999) [\+]\d{2}[\(]\d{2}[\)]\d{4}[\-]\d{4}
Integers with or without decimals (Format: 9 or 9.9) \-?\d+(\.\d{0,})?
UUID ^[0-9A-Fa-f]{8}\-[0-9A-Fa-f]{4}\-[0-9A-Fa-f]{4}\-[0-9A-Fa-f]{4}\-[0-9A-Fa-f]{12}$
'2. JS' 카테고리의 다른 글
[javascript] url 의 파라메타 값 가져오기 (0) | 2013.06.27 |
---|---|
트위터 json 연동 하여 callback 함수로 자바스크립트로 받기 (2) | 2013.06.11 |
[jquery] dotdotdot - 자동 말줄임 플러그인 (0) | 2013.04.30 |
jQuery 를 이용한 두 줄 이상 말줄임 적용(multi ellipsis) 소스 (0) | 2013.04.30 |
[javascript] 트위터 결과 받아오기 - callback (0) | 2013.02.01 |
이 포스팅은 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다.