extracting numeric vulues from cell char

1 回表示 (過去 30 日間)
Mohamuud hassan
Mohamuud hassan 2015 年 5 月 14 日
回答済み: Guillaume 2015 年 5 月 14 日
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.

採用された回答

Guillaume
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 件)

カテゴリ

Help Center および File ExchangeModeling についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by