I tested jorrasdk solution: it works well. Thanks jorrasdk . This solution is right if you want "find and replace all". Now consider that I've one or more part of the file in which I don't want to replace "%^(*^);*$" with "^1"
Here is an example of the text file:
.PROGRAM goofy()
la la ; bla bla
alb alb
.END
.PROGRAM micky()
; ping ping
pong pong
.END
and I want to change only the part of the text file between PROGRAM goofy() and .END that follows, while the part of the text between
.PROGRAM micky() and .END that follows must be unchanged.
The outcome must be:
.PROGRAM goofy()
la la
alb alb
.END
.PROGRAM micky()
; ping ping
pong pong
.END
To determine which part of the text file must be changed and which not is it possible to open a text file (in the same folder of the file to deal with) with the list of the parts (programs) to let unchanged? Something like this:
goofy
After having opened and read the list of parts (Programs) to let unchanged it could be possible to assign each name of program to an array variable and scan the entire text file, from the top to the botton, and change or not individual part (program) of the file. Is it possible?
Could someone help me?
PS. I now that this could be considered a repost. Sorry for this.
mosca
Here is an example of the text file:
.PROGRAM goofy()
la la ; bla bla
alb alb
.END
.PROGRAM micky()
; ping ping
pong pong
.END
and I want to change only the part of the text file between PROGRAM goofy() and .END that follows, while the part of the text between
.PROGRAM micky() and .END that follows must be unchanged.
The outcome must be:
.PROGRAM goofy()
la la
alb alb
.END
.PROGRAM micky()
; ping ping
pong pong
.END
To determine which part of the text file must be changed and which not is it possible to open a text file (in the same folder of the file to deal with) with the list of the parts (programs) to let unchanged? Something like this:
goofy
After having opened and read the list of parts (Programs) to let unchanged it could be possible to assign each name of program to an array variable and scan the entire text file, from the top to the botton, and change or not individual part (program) of the file. Is it possible?
Could someone help me?
PS. I now that this could be considered a repost. Sorry for this.
mosca