-
-
Save mindfulmike/67c8a0d28a59c81eb691e45f9e49947a to your computer and use it in GitHub Desktop.
RegEx: US Medicare Number Validate and Match
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 characters
# Accepted formats are 0-3 alpha, 9 digits, and 1-3 alpha-numeric with or without spaces and dashes: | |
# * AAA-000-00-0000-AAA | |
# | |
# http://survivinghealthinsurance.com/post/114021224748/medicare-id-numbers-suffixes-and-prefixes | |
/^([a-z]{0,3})[-\s]?(\d{3})[-\s]?(\d{2})[-\s]?(\d{4})[-\s]?([0-9a-z]{1,3})$/i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment