Jump to content

How to replace the whole line that begin with...


Recommended Posts

heh.. i need help again :P

Here is my problem: i can't figure it out how to replace whole line in file, instead of specified string. For example:

Winamp playlist contains this lines of text:

#EXTINF:428,02 - Void - Fuck The System (Skazi Remix)

D:\Qwerty\Void\02 - Void - Fuck The System (Skazi Remix).mp3

#EXTINF:464,02-void - hghway to hell-mycel

D:\Qwerty\Void\02-void_-_hghway_to_hell-mycel.mp3

I need 2 delete whole line that begin with "#EXTINF:", so at the end, file will contain only full paths, like this:

D:\Qwerty\Void\02 - Void - Fuck The System (Skazi Remix).mp3

D:\Qwerty\Void\02-void_-_hghway_to_hell-mycel.mp3

I have no idea how to work this out, and therefore my example looks like this :unsure:))

THankS.

Edited by crackmaster
Link to comment
Share on other sites

It's faster to read the whole file, delete it, modify the text using StringReplace, StringRegExpReplace etc. and write a new file with the modified text.

Yes, but how? I can replace "#EXTINF:" string, but i need to delete every line that begin with "#EXTINF:".

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...