I have a table with a column of strings. In each string, I need to find the '_' character and trim off it and all text to the right. My brain has stopped working and can't figure it out. Thanks!
T = table({"A_1";"A_2";"A_10"},[1;2;1],[6;7;5],... 'VariableNames',{'Section' 'Data1' 'Data2'})T = Section Data1 Data2 _______ _____ _____ "A_1" 1 6 "AB_2" 2 7 "B_10" 1 5
What I'd like is….T=
Section Data1 Data2 _______ _____ _____ "A" 1 6 "AB" 2 7 "B" 1 5
Best Answer