删除除带有特定单词的行之外的所有行 - Notepad++ [英] Remove All Lines except lines with a Specific Word - Notepad++

查看:46
本文介绍了删除除带有特定单词的行之外的所有行 - Notepad++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我导出了一份备份报告,显示服务器的备份状态,服务器有父作业和子作业.报告状态仅与父作业相关的行相关,子作业提供无关信息.父作业包含关键字每周".如何显示报告以仅显示带有 Weekly 一词的行,应删除所有其他行.谢谢.

I have exported a Backup Report that displays Backup Status of servers, the servers have a Parent Job and Child Job. The status of the Report is only relevant to the lines related to the Parent Job and Child Jobs provide irrelevant information. The Parent Job contains the keyword "Weekly". How can I display the report to only show lines with the word Weekly ,all other lines should be removed. Thanks.

推荐答案

1- 假设这是您的文件,并且您想删除其中没有WScript"的所有行.

1- Assume this is your file and you want to delete all lines which doesn't have "WScript" in it.

2- 执行正则表达式查找,如下所示.为所有必需的行添加书签.

2- Do a regex find as shown below. BookMark all the required lines.

3- 然后删除未标记的行

3- Then remove the unmarked lines

这篇关于删除除带有特定单词的行之外的所有行 - Notepad++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆