Use the MID function to extract the 5th character.
Use the INT function to convert that character to an integer. If it's a letter, it will fail conversion and return a null. So, check if it's null and if it is, it's a letter, if it's not null it's a number.
IF ISNULL(INT(MID([mystring],5,1))) THEN 'leave' else 'check' END