FInd value after matching String

4 Ansichten (letzte 30 Tage)
pavan nittala
pavan nittala am 9 Jul. 2019
Kommentiert: pavan nittala am 9 Jul. 2019
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]

Akzeptierte Antwort

Guillaume
Guillaume am 9 Jul. 2019
str2double(regexp(yourtext, '(?<=value: )\d+', 'match'))
  1 Kommentar
pavan nittala
pavan nittala am 9 Jul. 2019
Wow , you are a genius , Thanks !!
I am experienced in C/C++ but new to matlab , many thanks once again

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Data Type Identification finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by