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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find UK Company Number
Expression
^([0-9]{8})|(R[0-9]{7})|((AC|FC|GE|GN|GS|IC|IP|LP|NA|NF|NI|NL|NO|NP|NR|NZ|OC|RC|SA|SC|SF|SI|SL|SO|SP|SR)[0-9]{6})$
Description
Validates a UK company registration number according to the range of prefixes allowed by the HMRC
Matches
OC123456, R1234567, 12345678
Non-Matches
AB123456, A1234567, 1234567
Author Rating: Not yet rated. Graham Harper
Source http://www.hmrc.gov.uk/manuals/commanual/attachments/coy_reg_no_formats.doc
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-2025, RegexAdvice.com | ASP.NET Tutorials