HI, I am trying to construct a regEx pattern to match a UK tax code.
The pattern i have created is


I thought this would match the codes as BR or D0 or NT or K followed by 3 or 4 digits or 3 or 4 digits followed by L P T or Y.

However it does not work. I am quite new to regex and would be most greatful for any help.


hi...further info

have played about with the pattern slightly so that it is now


and the second part of the patern works fine....just the BR D0 and NT do not work now.

Thanks for any help

Hi there sorry to have waisted your time have solved it...I think...lol pattern now reads


Thanks for looking

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.