Notepad++ - delete all lines with certain text

折月煮酒 提交于 2019-12-24 03:23:56

问题


I have notepad++ 5.8.2 and I was trying to remove all lines starting with 'Processed XXXXX total records' where XXXXX is a various number.
I tried to CTRL+H and put 'Processed.$ in Find what selecting Regular Expression and putting blank in Replace with but it doesn't even find those lines Processed. Did I do something wrong in regex expression to find and replace them?


回答1:


This will help you:

  1. Press CTRL + H
  2. Select Regular Expression at the bottom
  3. Find ^Processed \d+ total records.*?
  4. Click Replace All

After, you may want to clean all the blank lines:

  1. Find ^\s*
  2. Click Replace All



回答2:


^Processed \d+ total records.*$

search and replace with blank.




回答3:


Nevermind,... found it right now... Had just to do .Processed.*$ with Regular Expression and it replaced with blank line then removed blank lines with TextFX integrated plugin



来源:https://stackoverflow.com/questions/23472052/notepad-delete-all-lines-with-certain-text

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!