Hi ,
I have a text file and i need to do the following Steps
1 Match if the line contains string value:
2. Extract the integer after value :
3. In the given text file , i am expecting values [10, 20, 30, 40, 50, 60]

 채택된 답변

Guillaume
Guillaume 2019년 7월 9일

1 개 추천

str2double(regexp(yourtext, '(?<=value: )\d+', 'match'))

댓글 수: 1

pavan nittala
pavan nittala 2019년 7월 9일
Wow , you are a genius , Thanks !!
I am experienced in C/C++ but new to matlab , many thanks once again

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Characters and Strings에 대해 자세히 알아보기

질문:

2019년 7월 9일

댓글:

2019년 7월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by