正则表达式中

单词指的是由字母、数字、下划线组合而成的字符串,用符号表示为\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

EmEditor正则表达式例子的更多相关文章

  1. Perl正则表达式例子

    Perl正则表达式 一.介绍 正则表达式各语言都有自己的规范,但是基本都差不多,都是由元字符的组合来进行匹配:由于Nmap内嵌的服务与版本探测是使用的Perl正则规范,因此此篇博客记录一下Perl正则 ...

  2. python正则表达式例子说明

    pattern = re.compile('<div.*?author">.*?<a.*?<img.*?>(.*?)</a>.*?<div.* ...

  3. C++正则表达式例子

    给了策划配置公式的地方,需要将策划配置的公式文本转化为可执行的脚本代码:比如:self->mHp*2+target->2mMp*GetHit()+ self_mon->4mDan/1 ...

  4. 关于Logstash中grok插件的正则表达式例子

    一.前言 近期需要对Nginx产生的日志进行采集,问了下度娘,业内最著名的解决方案非ELK(Elasticsearch, Logstash, Kibana)莫属. Logstash负责采集日志,Ela ...

  5. 一个 Java 正则表达式例子

    今天在项目里看到用 Python 正则表达式的时候,用到 group,没有仔细看.正好学习 Java 正则表达式,对 group 多留意了一下. 上代码: import java.util.regex ...

  6. java 正则表达式例子, 查找字符串

    import java.util.regex.Matcher;import java.util.regex.Pattern; public class Main { public static voi ...

  7. pyqt 正则表达式例子学习

    def rex01(self): username=QtCore.QRegExp('[a-zA-Z0-9_]{2,10}') self.names.setValidator(QtGui.QRegExp ...

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

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

  9. notepad++正则表达式例子

    1.匹配create table USR.APP (  这样的字符串: create.*USR.APP\s+\(

随机推荐

  1. brew命令

    下面参考下网友的总结: 查看brew的帮助 brew –help 安装软件 brew install git 卸载软件 brew uninstall git 搜索软件 brew search git ...

  2. 语言基础:C#运算符

    运算符 分类 符号 解释 优先级 算术运算符 ++   -- 加加  减减 由高到低,即执行顺序由上到下.(圆括号的优先级最高) *   /    % 乘  除  取余 +   - 加   减 关系运 ...

  3. oracle lsnrctl status|start|stop

    [oracle@redhat4 ~]$ lsnrctl status LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 06-OCT-2015 ...

  4. mysql 查看警告

    显示警告(打开): warnings 查看警告(查看内容): show warnings; 记录运行日志: tee  _logsfile source sql_filenotee

  5. [HDOJ4635]Strongly connected(强连通分量,缩点)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4635 题意:给一张图,问最多往这张图上加多少条边,使这张图仍然无法成为一个强连通图. 起初是先分析样例 ...

  6. redis状态与性能监控

    Redis介绍 Redis是一种高级key-value数据库.它跟memcached类似,不过数据可以持久化,而且支持的数据类型很丰富.有字符串,链表.哈希.集合和有序集合5种.支持在服务器端计算集合 ...

  7. BZOJ2086: [Poi2010]Blocks

    题解: 想了想发现只需要求出最长的一段平均值>k即可. 平均值的问题给每个数减去k,判断是否连续的一段>0即可. 然后我们发现如果i<j 且 s[i]<s[j],那么 j 对于 ...

  8. wince和window mobile winphone

    windows mobile是微软在2000年左右推出的针对移动平台的操作系统,这个系统一直使用到三年前,微软开始启用metro界面,将windows mobile改名为windows phone. ...

  9. AngularJS 拦截器和应用例子(转)

    $httpAngularJS 的 $http 服务允许我们通过发送 HTTP 请求方式与后台进行通信.在某些情况下,我们希望可以俘获所有的请求,并且在将其发送到服务端之前进行操作.还有一些情况是,我们 ...

  10. Android 长按setOnItemLongClickListener 注意细节

    Java代码 gridview.setOnItemLongClickListener(new OnItemLongClickListener() { @Override public boolean ...