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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find NHS Hospital Number (D Number)
Expression
[DJF]{1}[0-9]{5,8}
Description
I needed to ensure that a valid hospital number is entered into one of my systems. They must be prefixed with D,J,F (upper case) and a number (5 to 8 digits in length).
Matches
D82837 J23578 F23546530
Non-Matches
K23456 D4573 J354 F3493849384
Author Rating: Not yet rated. max b
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

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