/write -d only deletes one line at a time. So if you had the following two lines in a file:
test
test test and test again
then use /write -dstest file.txt it will delete the first line it finds that starts with test and stop. And here is where you lose me. I'm not sure if you want it to skip the first line and delete the second line or if you want it to delete any lines that start with test. Please post more information.