Hi all,
I have a TXT-File with the content
now I want to replace the content between xbeginx and xendx to make the TXT-File looks like
my code doesnt work
it seems it doesnt work on multiple lines....
can you help me?
thanks
I have a TXT-File with the content
Quote
file start
[xbeginx]
a
b
c
d
[xendx]
file stop
[xbeginx]
a
b
c
d
[xendx]
file stop
now I want to replace the content between xbeginx and xendx to make the TXT-File looks like
Quote
[xbeginx]
clean
[xendx]
clean
[xendx]
my code doesnt work
![:(](http://aut1.autoit-cdn.com/forum/public/style_emoticons/default/sad.png)
[ autoit ]
$sFile = "source.txt" $sText = FileRead($sFile,FileGetSize($sFile)) $aFound = _StringBetween($sText,"[xbeginx]","[xendx]") $sText = StringReplace($sText, "$aFound", "clean") $sFileNew = "result.txt" FileWrite($sFileNew,$sText)
thanks