How do I delete multiple lines from a text file?

Actually in my web browser project, users can add different URLs to their list of Favorites. The Favorites are written in a text file as & when they get added. Like IE, the Favorites are displayed in a menu. Users can also import their IE Favorites for which they have to click a menu item. When IE Favorites get imported, those Favorites are also populated in the text file where the other Favorites are written.

Now I want to give users the option to delete IE Favorites, if one wishes to do so. Deleting IE Favorites means all the IE Favorites have to be deleted from the text file & at the same time, the Favorites that the user added exclusively should be retained! So how do I delete all the IE Favorites from the text file ensuring that the non-IE Favorites are retained?