extracting numeric vulues from cell char
1 回表示 (過去 30 日間)
古いコメントを表示
hello every one; who can help me how to extract these email addresses from numeric values which placed before @ character:
km={'ibadal202@gmail.com';'qzaman@msn.com';'dfoorno020@msn.com';'myey@hotmail.com';'qkemal@myspace.com';'zvarfi1013@gmail.com';'vlul010@mynet.com';'uwardo@msn.com';'izaman@hotmail.com';'htimiro@myspace.com';'mfoorno@hotmail.com';'uelo@hotmail.com'}
thanks in advance.
0 件のコメント
採用された回答
Guillaume
2015 年 5 月 14 日
Regular expressions are very good for this:
km = {'ibadal202@gmail.com'
'qzaman@msn.com'
'dfoorno020@msn.com'
'myey@hotmail.com'
'qkemal@myspace.com'
'zvarfi1013@gmail.com'
'vlul010@mynet.com'
'uwardo@msn.com'
'izaman@hotmail.com'
'htimiro@myspace.com'
'mfoorno@hotmail.com'
'uelo@hotmail.com'};
numasstring = regexp(km, '\d+(?=@)', 'match', 'once') %find sequence of digits immediately followed by @.
numbers = cellfun(@str2double, numasstring)
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!