I need to validate a VAT number (9 digits long) which has the following validation scheme.
Let's assume that 9 digits as d1 d2 d3 d4 d5 d6 d7 d8 d9
where :
(d1*256 + d2*128 + d3*64 + d4*32 + d5*16 + d6*8 + d7*4 + d8*2) / 11 = d9
all the above sum divided by 11 equals d9
.
Is it possible to validate this VAT number with a Regular Expression and if yes how?