MATLAB: Split string into string based on character type

characterdigitlettersplitstring

Hello,
I have variable data that looks like this: 1A2 and is formatted number+letter(s)+number. I'd like to split this string to mentioned 3 types. Both numbers can be 2-digits. How can I do this?
I tried strtok and split but with no success. Thank you.

Best Answer

>> S = '1A2';
>> C = regexp(S,'(\d+)(\D+)(\d+)','tokens','once')
C =
'1' 'A' '2'