I would use variables as flags. You would need to set up different combinations to get the exact match but converting the characters to ASCII helps identify more easily if they are numbers or letters.
For example, create a variable called IsFirstCharANumberFlag:
=IF(Asc(Left([VALUE];1)) between (48;57) THEN ”Y” ELSE ”N”
or
IsThirdCharALetterFlag
=IF(Asc(UPPER(Left([VALUE];3)))) between (65;57) THEN ”Y” ELSE ”N”
where VALUE is the string object you are testing.