필터 지우기
필터 지우기

How to replace multiple strings in a txt file and keep the original format

조회 수: 1 (최근 30일)
Hi all, my problem is how to replace multiple strings in a txt file and keep its original format; the original file is
Section = 1
*Lookhere
10
Dont Lookhere
Section = 2
*Lookhere
20
Dont Lookhere
the post changed file is
Section = 1
*Lookhere
1000
Dont Lookhere
Section = 2
*Lookhere
2000
Dont Lookhere
So i must localize the n (* Lookhere) argument and i read the n numbers just after this argument and i store them in a vector to change them via a function (*100 for example) and i re write the file with the same original format
Tanks at advance

답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by