Jump to content

Remove stuff from a txt file


cowuser

Recommended Posts

In some posts before i fould out how i can add stuff inside a text file in a specific place... the thing is i now want to find a way to erase specific things from that file. i have put in special tags to everything i have put inside ( like # 120 is here and # 120 ends here ). I need a way to erase the lines with these comments and the lines between them.

Also is there a way i can erase only one line of these? let's say the line that says allow 120 ? i know what that line says.
Link to comment
Share on other sites

Well you don't need comments or anything on the lines to be able to erase only certain lines, but my question is do you want to keep the line in the file blank or remove it completely? I have the solution for your problem, I think, but the code will be slightly different depending on your desired effect.
Link to comment
Share on other sites

[!--quoteo(post=353046:date=Mar 9 2006, 12:38 AM:name=txmedic03)--][div class=\'quotetop\']QUOTE(txmedic03 @ Mar 9 2006, 12:38 AM) [snapback]353046[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Well you don't need comments or anything on the lines to be able to erase only certain lines, but my question is do you want to keep the line in the file blank or remove it completely? I have the solution for your problem, I think, but the code will be slightly different depending on your desired effect.
[/quote]

Well remove it completely. it's better because i don't want the file to grow very large with junk
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.