Created
November 15, 2015 10:15
-
-
Save sh4t/c64a95d09334aef2c9c2 to your computer and use it in GitHub Desktop.
Revisions
-
sh4t created this gist
Nov 15, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ Regular Expressions === I end up needing to reference a bunch of useful expressions in my day to day work. In an effort to stop thinking about writing them, as I loathe writing regular expressions; I have started to maintain this list. ##### USA, Social Security Number(s) matching No valid SSN begins with 666. Ignore them. `^((?!000)(?!666)([0-6]\d{2}|7[0-2][0-9]|73[0-3]|7[5-6][0-9]|77[0-1]))(\s|\-)((?!00)\d{2})(\s|\-)((?!0000)\d{4})$` ``` Matches: 455-55-4444, 333 22-1111, 733 11 1111 Non-Matches: 734-00-1111, 749-11-0000, 666-11-1111