haukex,
I suspected the record-separator issue so I wrote my test case (above) to allow me to experiment with them. I duplicated the original problem when I thought that I was simulating newline separators and the original regex and concluded that the problem was with the regex. Your comments and the OP's conclusions strongly suggest that I was wrong. Can you explain how my memory file fails to simulate the test case you used to confirm the original code?
OOPS, Simulation is correct. The problem is not duplicated. "Deleted" lines are replaced with a newline. This may be intentional.