728x90
반응형
Description | Pattern | ||
---|---|---|---|
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}$ |
728x90
728x90
BIG
'Programming > Web' 카테고리의 다른 글
jQuery 2. 요소 선택 방법 - 셀렉터 (0) | 2013.10.24 |
---|---|
자바스크립트 focus() 대신 location.hash 사용하기 (0) | 2013.08.27 |
[html5] Visual Cheat Sheet (1) | 2012.07.31 |
왜 div에 있는 p에 float:left를 하면 div의 background가 없어지나요? (0) | 2012.07.31 |
<label> 태그 용도 (0) | 2012.07.25 |
댓글