Regular Expressions using regexp
2 views (last 30 days)
Show older comments
I have a cell array of strings a = {'-2.4,-3';'2,3';'0,5';'-4,-2.5';'A';'V';'C'}
Now I want to list those strings which have a "comma".
0 Comments
Accepted Answer
Azzi Abdelmalek
on 12 Oct 2013
Edited: Azzi Abdelmalek
on 12 Oct 2013
a={'-2.4,-3';'2,3';'0,5';'-4,-2.5';'A';'V';'C'}
out=a(cellfun(@(x) ~isempty(strfind(x,',')),a))
0 Comments
More Answers (1)
See Also
Categories
Find more on String Parsing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!