Group string based on charachter
显示 更早的评论
Hi all If i have a string lets say a='1/23s' is there a way to take 1 and 23s seperately on some other variables so i can then extract only the numbers from them.
采纳的回答
更多回答(1 个)
Andrei Bobrov
2011-12-7
str2double(regexp(a,'\d+','match'))
and
regexp(a,'/','split')
类别
在 帮助中心 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!