当前位置:网站首页>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,添加下载更多插件。
本文内容到此结束了,
如有收获欢迎点赞收藏关注️,您的鼓励是我最大的动力。
如有错误疑问欢迎各位大佬指出。
主页:共饮一杯无的博客汇总保持热爱,奔赴下一场山海。

边栏推荐
- Niuke.com: the double pointer problem of receiving rainwater
- ARouter 组件之间跳转需免混淆
- 冶金行业数字化供应链管理系统:平台精益化企业管理,助力产业高质量发展
- 思考(八十六):主从实现思路
- 再见,2020,这碗毒鸡汤,我先干了
- PyQt5_ Qtablewidget paging radio right-click menu control
- Why can't the netherworld fortress machine be remotely connected to the server? What are the ways to solve such problems?
- GBASE观察:扩展分析型数据库
- Le roman du drapeau de l'imitation haute version flutter, apprenez - le
- 7、STM32——LCD
猜你喜欢

List中subList的add造成的死循环

Improvement of DC power distribution with open hall current sensor

一个人竟然撸了一个微博 APP

laravel之任务队列

STM32------ADC(电压检测)

图扑软件智慧风电:数字孪生 3D 风机智能设备运维

What is the production process of enterprise website? How long does it take to design and build a website?

接私活必备的 6 个开源项目

老龄化下背景下,综合能效管理平台为医院保驾护航

Leetcode——链表笔试题
随机推荐
Grpc security -2: fast implementation of server-side JWT authentication
Digital property management has become a trend. How can traditional property companies achieve digital butterfly change through transformation?
项目中常用到的 19 条 MySQL 优化
laravel之任务队列
入参参数为Object,但传递过去却成了[object object] 是因为需要转为JSON格式
图扑软件智慧风电:数字孪生 3D 风机智能设备运维
IDEA 自动生成单元测试,效率倍增!
The group procurement management system of daily chemical supplies industry changes the traditional procurement mode and reduces the procurement cost
Install using snap in opencloudos NET 6
iNFTnews | 创造者经济的未来在Web3世界中该去向何处?
《德阳市餐饮服务业油烟污染防治管理办法(征求意见稿)》之创新油烟监管
6. STM32 - serial port data transceiver Foundation
【HackTheBox】 meow
嵌入式接口复习资料
2018/GAN:Self-Attention Generative Adversarial Networks自我注意生成对抗网络
思考(八十六):主从实现思路
Construction of cache stack FIFO in different application scenarios for PLC data operation series (detailed algorithm explanation)
The digital transformation index report 2021 released by Tencent Research Institute has accelerated the digital transformation and upgrading of mainland enterprises!
Improvement of DC power distribution with open hall current sensor
MySQL索引底层为什么用B+树?看完这篇文章,轻松应对面试。