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