extract integers from random strings

Hi,
I have many strings composed by letters and numbers. Every string has this format 'randomword.integer'. I'd like to ignore the first part (word) and get the second (number). The first part keep changing so i can't use:
a= 'randomword.integer'
int=sscanf(a,'randomword.%d')
Any help?
Thanks in advance

 採用された回答

Walter Roberson
Walter Roberson 2013 年 12 月 11 日

0 投票

sscanf(a, '%*[^.].%d')

1 件のコメント

EK
EK 2013 年 12 月 11 日
Thanks a lot Walter! EK

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCharacters and Strings についてさらに検索

質問済み:

EK
2013 年 12 月 11 日

コメント済み:

EK
2013 年 12 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by