Should be the exact same regex as in the getTypeSize() call(s) above. Something like /^\w+(\(\d+\))?$/.