nonnegative integer^(?:0|[1-9][0-9]*)$Match example: 2048Only ASCII digits are allowed, no extra leading zeros are allowed.Copy
signed integer^[+-]?(?:0|[1-9][0-9]*)$Match example: -42Do not check whether the value exceeds the JavaScript safe integer range.Copy
simple decimal number^[+-]?[0-9]+(?:\.[0-9]+)?$Match example: -12.50Exponents, thousandth separators, or decimals with omitted integer parts are not accepted.Copy
Hexadecimal color^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$Match example: #3b82f6Only handles 3-bit and 6-bit RGB, does not include transparency and CSS color names.Copy
UUID text shape^[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}$Match example: 550e8400-e29b-41d4-a716-446655440000Only characters and groups are verified, version bits, variant bits, or uniqueness are not verified.Copy
date text shape^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])$Match example: 2024-02-29Only checks the format, does not validate leap years or days of the month, e.g. February 31st will still be rejected by the date parser.Copy
Simple email box shape^[^\s@]+@[^\s@.]+(?:\.[^\s@.]+)+$Match example: [email protected]This is not a standard verification of a complete email address; actual email existence requires a verification email to be sent.Copy
ASCII identifier^[A-Za-z_][A-Za-z0-9_]*$Match example: user_id2Does not include Unicode identifiers or exclude programming language reserved words.Copy
IPv4 decimal address^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])$Match example: 192.168.1.1Each segment ranges from 0 to 255, leading zeros, ports, CIDR, or IPv6 are not accepted.Copy
White space characters\s+Match example: a bJavaScript's whitespace set is not equal to all visual whitespace; this template is for lookup, not full paragraph validation.Copy