Extracting numbers from Text document

Hi, I have a text document which has the values a5229si. I should get the output as 5. Can anyone reply me the code.
Regards.,
Siva

2 件のコメント

TAB
TAB 2012 年 4 月 30 日
How data is formated in your text document.
Is it contains only a5229si ?
Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran 2012 年 4 月 30 日
Yes.

回答 (1 件)

Andrei Bobrov
Andrei Bobrov 2012 年 4 月 30 日

0 投票

regexprep(str,str,'5')

1 件のコメント

Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran 2012 年 4 月 30 日
I get different answer even if i use the same command which you gave. instead of '5' i mentioned 'z'...

この質問は閉じられています。

タグ

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by