Advertisement
weaknetlabs

Valid Social Security Number Regular Expression List

May 9th, 2019
2,514
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.60 KB | None | 0 0
  1. # Valid Social Security Number Regular Expression List
  2. # 2019 WeakNet Labs, Douglas Berdeaux
  3. # ============================================================
  4. # (https://en.wikipedia.org/wiki/Social_Security_number)
  5. # 666
  6. # 667-679
  7. # 681-699
  8. # 729-999
  9.  
  10. # Avoid 000:
  11. [0-5][0-9][1-9][^0-9][0-9]{2}[^0-9][0-9]{4} # 001-099,101-199,
  12. [1-9][0-9]0[^0-9][0-9]{2}[^0-9][0-9]{4} # 100-190,200-290,300-390,...,900-990
  13. # Avoid 666:
  14. 6([0-5]|[7-9])[0-9][^0-9][0-9]{2}[^0-9][0-9]{4} # 600-659
  15. 66([1-5]|[7-9])[^0-9][0-9]{2}[^0-9][0-9]{4} # 661-665,667-669
  16. # The final set:
  17. 7[0-2][0-9][^0-9][0-9]{2}[^0-9][0-9]{4} # 700-729
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement