UK National Insurance (NiNo) RegEx for InfoPath 2010 field - InfoPath Dev
in

InfoPath Dev

UK National Insurance (NiNo) RegEx for InfoPath 2010 field

Last post 10-29-2013 09:13 AM by wilkies0106aw. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-29-2013 03:27 AM

    UK National Insurance (NiNo) RegEx for InfoPath 2010 field

    Hi all,

    I'm looking for some help with validating a correctly formatted string to the UK National Insurance number format: 

    The basic format is : Two prefix letters, six digits and one suffix letter example. AB123456C

    Often, the number is printed/entered with spaces to pair off the digits, like this: AB 12 34 56 C

    Some specific rules for this format:

    • Neither of the first two letters can be D, F, I, Q, U or V. The second letter also cannot be O.
    • The prefixes BG, GB, NK, KN, TN, NT and ZZ are not allocated.
    • The suffix letter is either A, B, C or D

    I've used the following custom pattern just to get the basic format covered: \p{L}\p{L}\d\d\d\d\d\d\p{L} but wondered if anyone could help 'fine-tune' this for me? Also if we could cater for potential spaces would be ideal.

    Many thanks for any help/guidance. :)

    Bjorn

  • 10-29-2013 09:13 AM In reply to

    Re: UK National Insurance (NiNo) RegEx for InfoPath 2010 field

     Does this help - http://www.regexlib.com/REDetails.aspx?regexp_id=527&AspxAutoDetectCookieSupport=1 or http://www.etl-tools.com/regular-expressions/is-uk-national-insurance-number.html

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.