当前位置:网站首页>Notepad++实用功能分享(正则行尾行首替换常用方法、文本比对功能等)
Notepad++实用功能分享(正则行尾行首替换常用方法、文本比对功能等)
2022-06-23 22:18:00 【共饮一杯无】
很多时候需要给多行文本的前后加字符或者文本,一行一行添加是在太麻烦了。notepad++提供了一键替换的功能。
替换常用方法
打开nodepad++软件,使用ctrl+H进入替换选择框,然后勾选循环查找(wrap around),查找模式选择正则表达式(Reqular expression);
行首插入"^"
在行首插入分号’,在查找目标(Find what)输入^,然后在替换为(replace with)输入需要替换的分号’。
行尾插入"$"
在行首插入分号’,在查找目标(Find what)输入$,然后在替换为(replace with)输入需要替换的分号’。
行首空格和空行去除:“^\s+” -> “”
行尾空格和空行去除: “\s+$” -> “”
增加行:“\r\n” -> “\r\n\r\n”
缩减行:“\r\n\r\n” -> “\r\n”
多行转一行:“\r\n” -> “”
按xxx分割符换行:“xxx” -> “\r\n”
按非xxx开头换行:“^(?!xxx)” -> “\r\n”
AB列CD列快速互换:“(AB)\t(CD)” ->“$2\t$1”
常用插件
文本比对
打开notepad++拖动要比对的文件到右侧,选择 Move to other view(移动到另一视图),选择Plugins->Compare->Compare效果如下:
要添加更多插件可以选择Plugins->Plugin Manager->Show Plugin Manager,添加下载更多插件。
本文内容到此结束了,
如有收获欢迎点赞收藏关注️,您的鼓励是我最大的动力。
如有错误疑问欢迎各位大佬指出。
主页:共饮一杯无的博客汇总保持热爱,奔赴下一场山海。

边栏推荐
- AutoCAD -- summarize three methods of drawing rounded corners in CAD
- 7、STM32——LCD
- Postman return value Chinese garbled????
- Stm32-------adc (voltage detection)
- 入参参数为Object,但传递过去却成了[object object] 是因为需要转为JSON格式
- Bitmap加载内存分析
- Graph theory (nearest common ancestor LCA)
- 6 大完整开源项目,一次学个够
- "Shanda Diwei Cup" the 12th Shandong ICPC undergraduate program design competition
- VS QT VTK 左下角显示同步小坐标轴
猜你喜欢
随机推荐
再见,2020,这碗毒鸡汤,我先干了
《德阳市餐饮服务业油烟污染防治管理办法(征求意见稿)》之创新油烟监管
E: 无法获得锁 /var/lib/dpkg/lock
2022年信息安全工程師考試知識點:訪問控制
2018/GAN:Self-Attention Generative Adversarial Networks自我注意生成对抗网络
[things about gbase] gbase 8s high availability technology and case analysis (issue 02)
3D打印和激光切割流程的初步了解
三款很酷很骚气的底部导航
2022 information security engineer examination knowledge point: access control
Graph theory (nearest common ancestor LCA)
Kotlin coroutine asynchronous flow
Can the characteristics of different network structures be compared? Ant & meituan & NTU & Ali proposed a cross architecture self supervised video representation learning method CaCl, performance SOTA
Setting method of bar code local segment data variable
The digital transformation index report 2021 released by Tencent Research Institute has accelerated the digital transformation and upgrading of mainland enterprises!
Gbase observation: extended analytical database
2022 point de connaissance de l'examen des ingénieurs en sécurité de l'information: contrôle d'accès
2022山东健博会,济南国际大健康产业博览会,中国营养健康展
高仿書旗小說 Flutter 版,學起來
How to achieve the turning effect of wechat video recording?
嵌入式接口复习资料








