正则表达式中

单词指的是由字母、数字、下划线组合而成的字符串,用符号表示为\w(小写)

空白符包括单字节空格、双字节空格制表符,用符号表示为\s(小写)

1.匹配被双引号包含的所有字符串(strings surrounded by double-quotation marks)

".*?"

2.匹配被方括号包含的所有字符串(strings surrounded by [ ])

\[[^\[]*?\]

3.匹配变量名(variable names)

[a-zA-Z_][a-zA-Z_0-9]*

4.删除所有空白行

^\s*\n

strings surrounded by double-quotation marks
".*?"
strings surrounded by [ ]
\[[^\[]*?\]
variable names
[a-zA-Z_][a-zA-Z_0-9]*
IP addresses
([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})
URL
(\S+)://([^:/]+)(:(\d+))?(/[^#\s]*)(#(\S+))?
lines followed by a tab
\t.*$
Hiragana
[\x{3041}-\x{309e}]
Full-width Katakana
[\x{309b}-\x{309c}\x{30a1}-\x{30fe}]
Half-width Kana
[\x{ff61}-\x{ff9f}]
CJK ideographs
[\x{3400}-\x{9fff}\x{f900}-\x{fa2d}]
CJK ideograph marks
[\x{3000}-\x{3037}]
Hangul
[\x{1100}-\x{11f9}\x{3131}-\x{318e}\x{ac00}-\x{d7a3}]
Insert // at start of lines
Find: ^
Replace with: //
Remove // at start of lines
Find: ^//
Replace:
Remove trailing whitespaces
Find: \s+?$
Replace with:
Replace (abc) with [abc]
Find: \((.*?)\)
Replace: \[\1\]
Replace <H3 ...> with <H4 ...>
Find: <H3(.*?)>
Replace: <H4\1>
Replace 9/13/2003 with 2003.9.13
Find: ([0-9]{1,2})/([0-9]{1,2})/([0-9]{2,4})
Replace: \3\.\1\.\2
Uppercase characters from a to z
Find: [a-z]
Replace: \U\0
Capitalize all words
Find: ([a-zA-Z])([a-zA-Z]*)
Replace: \U\1\L\2

转载于:https://www.cnblogs.com/niaomingjian/p/5099798.html

EmEditor正则表达式例子相关推荐

  1. EmEditor 正则表达式语法

    EmEditor 正则表达式语言基于 Perl 正则表达式语法. 文字 所有字符都是文字除了: ".", "*", "?", "+ ...

  2. python非贪婪、多行匹配正则表达式例子[转载]

    python非贪婪.多行匹配正则表达式例子[转载] 一些regular的tips: 1 非贪婪flag >>> re.findall(r"a(\d+?)", &q ...

  3. python正则表达式处理txt_Python文本处理服务(re正则表达式例子)

    正则表达式例子 检查对子 在此示例中,我们将使用以下帮助函数来更优雅地显示匹配对象: def displaymatch(match):    if match is None:        retu ...

  4. emeditor正则表达式_掌握EmEditor正则表达式语法,大大提升工作效率

    缙哥哥非常懒,当遇到重复的事情时,就喜欢通过批量处理来解决,而文本用的是 EmEditor 程序,EmEditor 正则表达式语言基于 Perl 正则表达式语法,所以通过掌握EmEditor正则表达式 ...

  5. emeditor正则表达式_Emeditor中使用正则表达式的一些技巧

    正则表达式的功能非常强大,使用文本编辑器的过程中发现使用正则表达式进行替换非常方便,能完成许多普通的字符替换完成不了的效果,下面就是例子: EmEditor文本编辑器中使用正则表达式进行替换的示例: ...

  6. emeditor正则表达式_EmEditor 正则表达式使用实例教程

    一.基础篇 1. [cpp] view plaincopy ^  匹配行首,比如说查找^s, 就是查位于行首的 s 2. [cpp] view plaincopy .*?$  这个用处比较大,但一般不 ...

  7. emeditor正则表达式_教你EmEditor如何使用正则表达式?

    EmEditor是一款非常好用的文字编辑工具,自推出以来凭借着功能强大.灵活高效等特点受到了广大用户的一致好评,该软件可完全取代Windows内建的NotePad记事本功能,支持查找高亮显示.大写小写 ...

  8. C++11正则表达式例子集合

    #include <string> #include <regex> #include <iostream> using namespace std;int tes ...

  9. Java正则表达式例子汇总

    1.过滤特殊字符 package com.sheepmu.text;/* * @author sheepmu*/ public class HWCompetition {public static v ...

最新文章

  1. Linux笔记(更改权限chmod,更改所有组chown,umask,隐藏权限chattr)
  2. linux shell 下载并执行
  3. 曙光高性能服务器,曙光高性能进入世界前十_中科曙光服务器_服务器知识学堂-中关村在线...
  4. httpclient 学习
  5. python储存_python数据储存
  6. [html] 写一个标签云的布局
  7. 【ASP.NET】HTTP中的 get 和 post 请求
  8. S3C2440时钟电源管理
  9. 音频处理之语音加速播放
  10. 计算机制图师岗位技能要求,机械制图员
  11. cad二次开发之无法验证该可执行文件的发布者解决方案
  12. android 播放assets下视频,安卓播放assets文件里视频文件相关问题分析
  13. 1000以内的水仙花数有哪些?(3位数的水仙花数有哪些?)
  14. L2-029 特立独行的幸福
  15. 金融小白进阶记——金融加速器
  16. 关于爬取豆瓣电影和豆瓣书本的图片
  17. 将QQ音乐下载的 tkm 格式的音乐文件如何免费转换成 MP3 格式
  18. 轻松认识HTTP协议的概念和工作原理
  19. hub_probe()
  20. 【MATLAB】通信信号调制通用函数 — 窄带高斯白噪声的生成

热门文章

  1. CakePHP 3.7.6 发布,PHP 快速开发框架
  2. Java数据结构与算法(二) 简单排序
  3. 三、 复杂对象类型的WebService
  4. 远程连接 Mysql 失败的解决方法
  5. linux DISPLAY变量
  6. cpu out of order, 性能优化
  7. Codeforces Round #320 (Div. 2) [Bayan Thanks-Round]
  8. android 优化
  9. 台大李宏毅Machine Learning 2017Fall学习笔记 (8)Backpropagation
  10. torch.nn 介绍(部分)