EmEditor正则表达式例子
正则表达式中
单词指的是由字母、数字、下划线组合而成的字符串,用符号表示为\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正则表达式例子的更多相关文章
- Perl正则表达式例子
Perl正则表达式 一.介绍 正则表达式各语言都有自己的规范,但是基本都差不多,都是由元字符的组合来进行匹配:由于Nmap内嵌的服务与版本探测是使用的Perl正则规范,因此此篇博客记录一下Perl正则 ...
- python正则表达式例子说明
pattern = re.compile('<div.*?author">.*?<a.*?<img.*?>(.*?)</a>.*?<div.* ...
- C++正则表达式例子
给了策划配置公式的地方,需要将策划配置的公式文本转化为可执行的脚本代码:比如:self->mHp*2+target->2mMp*GetHit()+ self_mon->4mDan/1 ...
- 关于Logstash中grok插件的正则表达式例子
一.前言 近期需要对Nginx产生的日志进行采集,问了下度娘,业内最著名的解决方案非ELK(Elasticsearch, Logstash, Kibana)莫属. Logstash负责采集日志,Ela ...
- 一个 Java 正则表达式例子
今天在项目里看到用 Python 正则表达式的时候,用到 group,没有仔细看.正好学习 Java 正则表达式,对 group 多留意了一下. 上代码: import java.util.regex ...
- java 正则表达式例子, 查找字符串
import java.util.regex.Matcher;import java.util.regex.Pattern; public class Main { public static voi ...
- pyqt 正则表达式例子学习
def rex01(self): username=QtCore.QRegExp('[a-zA-Z0-9_]{2,10}') self.names.setValidator(QtGui.QRegExp ...
- Java正则表达式例子汇总
1.过滤特殊字符 package com.sheepmu.text; /* * @author sheepmu */ public class HWCompetition { public stati ...
- notepad++正则表达式例子
1.匹配create table USR.APP ( 这样的字符串: create.*USR.APP\s+\(
随机推荐
- lua string函数
lua的string函数: 参数中的index从1开始,负数的意义是从后开始往前数,比如-1代表最后一个字母 对于string类型的值,可以使用OO的方式处理,如string.byte(s.i)可以被 ...
- windows系统下Python环境的搭建
1.下载最新的Python版本3.5.0.
- 代码自动生成工具_java版
项目结构: 这里要实现的功能是,当我们给出了bean,如:Admin,User,People等实体类后, 我想用代码自动生成我想要的代码,最后生成的效果: 也就是说为每一个bean都生成相应的Dao, ...
- [51NOD1126]求递推序列的第n项(矩阵快速幂)
题目链接:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1126 存在参数a,b为负数的情况.这时候要这么处理: 根据mo ...
- 设置COOKIE过期时间的方法
第一,日期运算法 1)将期限设置为当前日期后的第N天的0时0分0秒 Response.Cookies(LastView).Expires=dateadd(d,N,date) 2)将期限设置为当前日期后 ...
- IE css expression(表达式)
很多时候我们需要对IE6的bug写一些hack,如max-height,absolute元素高度100%等. css里面的 expression(表达式)和js里面的差不多,如: 获取当前元素的高度: ...
- Ural1076(km算法)
题目大意 给出n*n表格,第a[i,j]表示i到j的权值,现在我们要将每个a[i,j]=sum[j]-a[i,j], 求出当前二分图a[][]最小匹配 最小匹配只需将权值取负后,求二分图最大匹配,使用 ...
- 函数buf_page_get_gen
/********************************************************************//** This is the general functi ...
- parseInt和valueOf
.parseInt和valueOf.split static int parseInt(String s) 将字符串参数作为有符号的十进制整数进行分析. static Integer valueOf( ...
- Liunx 配置IDE
如果你还没装编译环境或自己不确定装没装,不妨先执行 sudo apt-get install build-essential 如果你已经了解一些 vim 的知识,而且想用它来编辑源代码,那么我们不妨装 ...