RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Valid Medicare HIC number
Expression
(?![A-Z](\d)\1{5,})(^[A-Z]{1,3}(\d{6}|\d{9})$)|(^\d{9}[A-Z][0-9|A-Z]?$)
Description
Matches valid Medicare HIC number according to CMS specifications
Matches
H123456 | XYZ123456789 | 123456789B
Non-Matches
H123 | H999999 | H1234XB
Author Rating: The rating for this expression. Brian Thiessen
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Very nice
Name: rhelm
Date: 10/21/2010 9:59:33 AM
Comment:
Thanks for posting this. Not exactly sure about the first group - why you're not allowing the same number more than 5 times - but I assume it's following guidelines somewhere. Thanks for posting!


Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials