lindawqu
July 17th, 2001, 09:18 PM
what is the better way to replace some lines with some new text in a text file?
********************** test.txt ***********
Fill out the form below to post a message on the board. HTML is disabled for this board so you may not use it in your posts. Markup is enabled so you may use Markup on in your posts. Anonymous postings are not allowed, so you will need to register a Username before you can post.
<- new code start ->
Thanks. this is a test
what is this?
<- new test end - >
Tip: You can enclose a block of source code within This will preserve the formatting and add syntax highlighting.
********************************************
I want the following part
<- new code start ->
Thanks. this is a test
what is this?
<- new test end - >
to be replaced by
<- new line start ->
what a nice day!
I will be back soon.
<- new line end - >
********************** test.txt ***********
Fill out the form below to post a message on the board. HTML is disabled for this board so you may not use it in your posts. Markup is enabled so you may use Markup on in your posts. Anonymous postings are not allowed, so you will need to register a Username before you can post.
<- new code start ->
Thanks. this is a test
what is this?
<- new test end - >
Tip: You can enclose a block of source code within This will preserve the formatting and add syntax highlighting.
********************************************
I want the following part
<- new code start ->
Thanks. this is a test
what is this?
<- new test end - >
to be replaced by
<- new line start ->
what a nice day!
I will be back soon.
<- new line end - >