Snippet Name: Regex Matching Patterns
Description: Some miscellaneous regex patterns to match common items.
Comment: (none)
Language: REGEX
Highlight Mode: HTML4STRICT
Last Modified: February 27th, 2009
|
Social Security Number
^(?!000)([0-6]\d{2}|7([0-6]\d|7[012]))([ -]?)(?!00)\d\d\3(?!0000)\d{4}$
US phone with or without parentheses
^\([0-9]{3}\)\s?[0-9]{3}(-|\s)?[0-9]{4}$|^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$
ISO Date (19th to 21st century only)
^((18|19|20)\d\d)-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])$ |