Marc,
You may need to expand on your question a bit because I can't see where a regex will help you as opening a file, reading lines, writing lines etc are fairly standard programming tasks.
The only things I can think of are:
- you need a regex to select the specific file fom a list
- you need a regex to conditionally select the first matching record that is to be deleted
Susan