Last active
November 5, 2021 19:13
-
-
Save jgornick/466447572cdc89e6fc9d to your computer and use it in GitHub Desktop.
RegEx: US Medicare Number Validate and Match
This file contains 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/2010/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