当前位置:网站首页>地表最强编辑器Sublime | 正则表达式使用技巧
地表最强编辑器Sublime | 正则表达式使用技巧
2022-07-20 11:58:00 【訢詡】
Ctrl+F 搜索
Ctrl+H 替换
打开 [.*] 按钮开始正则表达式:
比较常用的有:
^ 匹配开头
$ 匹配结尾
\n 换行
\t 缩进
\d 数字
\d+ 任意个数字
. 任意字符
\w 除标点之外的字符(数字,字母,汉字)
\s 空格,缩进,换行(隐藏字符)
\u 或者 \l所有汉字
组合使用,例如 匹配空行 ^\n 替换为空
变量:
例如匹配138xxxxxxxx开头的串,且换行
匹配:(138........)
替换 \n$1
每一对()代表一组数据,在替换里面$1就代表原数据第一组。
执行后就会变成
13812312312
13899992222
这样子
边栏推荐
- 自动推理的逻辑05--谓词演算
- ZCMU--5150: gsy 的仓库盲跑(C语言)
- 如何提高LED显示屏清晰度?
- what? Does the multi merchant system not adapt to app? This is coming!
- Pom报错
- 在windows server2012 r2中搭建mysql数据库
- Hcip notes day 9
- 上海文旅局局长:安全是文旅业的生命线,正抢抓元宇宙新赛道
- Data structure of MySQL index
- R语言使用mean函数计算样本(观测)数据中指定变量的相对频数:计算dataframe中指定数据列的值等于指定内容的比例(取值为NJ的内容在数据列中的比例)
猜你喜欢
随机推荐
MapStruct - Consider defining a bean of type in your configuration.
Google Earth Engine——MERRA-2 M2T1NXAER:1980-2022年气溶胶逐日数据集
上海文旅局局长:安全是文旅业的生命线,正抢抓元宇宙新赛道
年度重磅!华为云2021应用构建技术实践精选集,七大领域400页+云上开发宝典 | 云享·书库 No.02 期推荐(附免费下载)
30讲 线性代数 第六讲 二次型
OCR/STR生僻字数据训练 | PaddleOCR的垂类Fine-tune(2)
自动推理的逻辑05--谓词演算
换掉 Notepad++,事实证明它更牛逼!
C traps and defects Chapter 2 syntax "traps" 2.1 understanding function declarations
R语言使用mean函数计算样本(观测)数据中指定变量的相对频数:计算dataframe中指定数据列的值等于指定内容的比例(取值为NJ的内容在数据列中的比例)
C and pointer Chapter 2 syntax "trap" 2.2 priority of operators
ZCMU--5150: gsy 的仓库盲跑(C语言)
Seata 多语言体系建设
2022 | Sample Efficiency Matters: A Benchmark for Practical Molecular Optimization
PG operation and maintenance -- common management commands
Peripherals: ADC
vim加密文件「建议收藏」
C traps and defects Chapter 2 lexical "traps" 2.3 pay attention to the semicolon marked as the end of the sentence
【NDK】EGL/egl. h: No such file or directory
精品方案|海泰云密码应用服务解决方案 打造安全合规的云上应用