Revert "delete matched text when pattern found"

This reverts commit e225319c00b56eb2e321fe049bd3c096af19d56f.