MATLAB: How to find a first letter in a string

find letters in string

Hello,
I have the following string:
str = '2017-03-28_155051 - JoaquinLR_600fps_ForeheadChestWrist_5minRest';
I would like automatically extract from that string the name, which is JoaquinLR
what would be the best way to do it?
I was thinking maybe I'll find the first letter after space?

Best Answer

str = '2017-03-28_155051 - JoaquinLR_600fps_ForeheadChestWrist_5minRest';
idx = find(isletter(str), 1);
name = strtok(str(idx:end), '_');