Read/write in a file

  • Thread starter Thread starter marc-andr?
  • Start date Start date
M

marc-andr?

Hello all,

there it is...

In an Asp.net application, I have to read a file. And When I found a
specific string (for example : "daddy") I have to write a string just
after that.

So my initial will be : daddy is cool.
and my final : daddy is VERY cool.

It seem to be weird... but i need it in my project:)

thanks!
 
Thanks for sharing. What was the question?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
read your file line by line using ReadLine() and use regular expression to
search and replace each instance of your word with the VERY your word.
have a look at Regex.Replace Method of msdn for the example.
 
marc-andr? said:
Hello all,

there it is...

In an Asp.net application, I have to read a file. And When I found a
specific string (for example : "daddy") I have to write a string just
after that.

So my initial will be : daddy is cool.
and my final : daddy is VERY cool.

It seem to be weird... but i need it in my project:)

thanks!
 
Back
Top