I just started working on this as well. I have to do the validation in oracle. I've had to break it into a series of checks. Is the first position a number, if so, if the length is over 9 what letter is in the 10th position. Once I've found out the character in the 10th position I used this as a validation (assumes 'B' in the 10th position):
if not owa_pattern.match(i_hicn, '^\d{9,9}B{1}[A,D,G,H,J,K,L,N,P,Q,R,T,W,Y,1-9]{0,1}$') then
result := 'HICN is invalid';
end if;
9 and only 9 numbers, B then either a number 1 through 9 or a letter in the list. I'm relatively new to regular expressions so take this with a grain of salt.