replace expression changed, now removes empty lines