作者:越秀地产星汇凤凰近_681 | 来源:互联网 | 2023-06-20 16:41
这里分享如何去除Notepad++搜索结果所带行号一般搜索结果显示如下:SearchPowerManagerServiceInjector(9hitsin1file)
这里分享如何去除Notepad++搜索结果所带行号
一般搜索结果显示如下:
Search "PowerManagerServiceInjector" (9 hits in 1 file)
Line 52860: 11-25 10:03:23.943 D/PowerManagerServiceInjector( 1190): wakeLock held when sleep request [user request]:
Line 52862: 11-25 10:03:23.943 D/PowerManagerServiceInjector( 1190): android[1000]
Line 52864: 11-25 10:03:23.943 D/PowerManagerServiceInjector( 1190): PARTIAL_WAKE_LOCK 'LocationManagerService' (uid=1000, pid=1190, ws=WorkSource{10021 com.android.browser})
Line 57688: 11-25 10:05:00.333 D/PowerManagerServiceInjector( 1190): wakeLock held when sleep request [user request]:
Line 57690: 11-25 10:05:00.333 D/PowerManagerServiceInjector( 1190): android[1000]
Line 57692: 11-25 10:05:00.333 D/PowerManagerServiceInjector( 1190): PARTIAL_WAKE_LOCK 'LocationManagerService' (uid=1000, pid=1190, ws=WorkSource{10021 com.android.browser})
Line 67938: 11-25 10:09:44.580 D/PowerManagerServiceInjector( 1190): wakeLock held when sleep request [user request]:
Line 67940: 11-25 10:09:44.580 D/PowerManagerServiceInjector( 1190): android[1000]
Line 67942: 11-25 10:09:44.580 D/PowerManagerServiceInjector( 1190): PARTIAL_WAKE_LOCK 'LocationManagerService' (uid=1000, pid=1190, ws=WorkSource{10021 com.android.browser})
Sear
方法一:
将搜索结果复制到新建页,光标定位到第一行起始焦点,按住Alt键,然后下拉,这个是 列选 方法,选中行号那一列删除即可
方法二:
- Ctrl+F -> 标记 -> 标记要搜索的关键字(本例为“PowerManagerServiceInjector”) –> 查找全部
- 搜索 –> 书签 -> 复制书签行
- 新建一页,粘贴即可
方法三:
将搜索结果粘贴到新建页,Ctrl+H -> 查找目标 -> 输入去掉行号的正则表达式(如 Line\s+\d+: ) -> 全部替换即可
效果:
11-25 10:03:23.943 D/PowerManagerServiceInjector( 1190): wakeLock held when sleep request [user request]:
11-25 10:03:23.943 D/PowerManagerServiceInjector( 1190): android[1000]
11-25 10:03:23.943 D/PowerManagerServiceInjector( 1190): PARTIAL_WAKE_LOCK 'LocationManagerService' (uid=1000, pid=1190, ws=WorkSource{10021 com.android.browser})
11-25 10:05:00.333 D/PowerManagerServiceInjector( 1190): wakeLock held when sleep request [user request]:
11-25 10:05:00.333 D/PowerManagerServiceInjector( 1190): android[1000]
11-25 10:05:00.333 D/PowerManagerServiceInjector( 1190): PARTIAL_WAKE_LOCK 'LocationManagerService' (uid=1000, pid=1190, ws=WorkSource{10021 com.android.browser})
11-25 10:09:44.580 D/PowerManagerServiceInjector( 1190): wakeLock held when sleep request [user request]:
11-25 10:09:44.580 D/PowerManagerServiceInjector( 1190): android[1000]
11-25 10:09:44.580 D/PowerManagerServiceInjector( 1190): PARTIAL_WAKE_LOCK 'LocationManagerService' (uid=1000, pid=1190, ws=WorkSource{10021 com.android.browser})
PS:搜索出结果,记得善用Notepad++的Style token功能,即选中关键字->鼠标右键->“Style token”-> 使用格式1~5
标记不同的颜色,方便分析