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

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 11 Dez. 2013

0 Stimmen

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

Weitere Antworten (0)

Kategorien

Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange

Gefragt:

EK
am 11 Dez. 2013

Kommentiert:

EK
am 11 Dez. 2013

Community Treasure Hunt

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

Start Hunting!

Translated by