a possible regex solution instead of

if ($mid(%ident,2,1) isletter && $mid(%ident,3,20) isnum) {

is:

if ($regex(%ident,^[a-zA-Z][0-9][0-9]+$)) {

it now takes all digits instead of the first 20 you specified