haiyun.me - 正则









Search Preview

正则 - 海运的博客

haiyun.me
海运的博客 首页 关于 分析网站 文章归档 参考手册 在线工具 常用命令
.me > haiyun.me

SEO audit: Content analysis

不支持
Language Error! No language localisation is found.
Title 正则 - 海运的博客
Text / HTML ratio 50 %
Frame Excellent! The website does not use iFrame solutions.
Flash Excellent! The website does not have any flash contents.
Keywords cloud

' class=regex> 不支持(同

匹配前面的子表达式 ? \ string 不支持(同? 匹配 nm 能匹配 0?
Keywords consistency
Keyword Content Title Description Headings
44
不支持 30
21

14
' 10
class=regex> 7
Headings
H1 H2 H3 H4 H5 H6
1 3 0 0 3 0
Images We found 1 images on this web page.

SEO Keywords (Single)

Keyword Occurrence Density
44 2.20 %
不支持 30 1.50 %
21 1.05 %

14 0.70 %
' 10 0.50 %
class=regex> 7 0.35 %
不支持(同 7 0.35 %
7 0.35 %
6 0.30 %
匹配前面的子表达式 5 0.25 %
? 5 0.25 %
\ 5 0.25 %
5 0.25 %
string 5 0.25 %
不支持(同? 4 0.20 %
4 0.20 %
匹配 4 0.20 %
nm 4 0.20 %
能匹配 4 0.20 %
0? 4 0.20 %

SEO Keywords (Two Word)

Keyword Occurrence Density
20 1.00 %
不支持 不支持 14 0.70 %

10 0.50 %
7 0.35 %
7 0.35 %
n n 6 0.30 %
class=regex> 5 0.25 %
不支持(同 不支持(同 4 0.20 %
1 1 3 0.15 %
B B 3 0.15 %
w w 3 0.15 %
W W 3 0.15 %
\ \ 3 0.15 %
string string 3 0.15 %
3 0.15 %
3 3 3 0.15 %
b b 3 0.15 %
2013 分类:正则 3 0.15 %
nm nm 2 0.10 %
xy xy 2 0.10 %

SEO Keywords (Three Word)

Keyword Occurrence Density Possible Spam
7 0.35 % No

6 0.30 % No
class=regex>
5 0.25 % No
5 0.25 % No
n n n 3 0.15 % No
0? 3 0? 2 0.10 % No
) 不支持 不支持 2 0.10 % No
2 0.10 % No
不支持(同n n n 2 0.10 % No
不支持(同 不支持(同 不支持(同 2 0.10 % No
3 3 3 2 0.10 % No
W W W 2 0.10 % No
1 1 1 2 0.10 % No
\ \ \ 2 0.10 % No
发布时间:August 9 2013 2 0.10 % No
不支持 不支持 不支持 2 0.10 % No
w w w 2 0.10 % No
), 例如:' ' 2 0.10 % No
9 2013 分类:正则 2 0.10 % No
string string string 2 0.10 % No

SEO Keywords (Four Word)

Keyword Occurrence Density Possible Spam
5 0.25 % No
class=regex>
5 0.25 % No

5 0.25 % No
发布时间:August 9 2013 分类:正则 2 0.10 % No
不支持(同n n n n 2 0.10 % No
2013 分类:正则 No Comments 2 0.10 % No
海运的博客 首页 关于 分析网站 1 0.05 % No
汉字字符 1 0.05 % No
24小时制 10? 2 1 0.05 % No
10? 2 1 0.05 % No
class=regex>10? 2
1 0.05 % No
2
1 0.05 % No
汉字字符 1 0.05 % No
汉字字符 1 0.05 % No
时间小时分钟 24小时制 1 0.05 % No
汉字字符 1 0.05 % No
中文及全角标点符号字符 1 0.05 % No
中文及全角标点符号字符 1 0.05 % No
中文及全角标点符号字符 1 0.05 % No
中文及全角标点符号字符 1 0.05 % No

Internal links in - haiyun.me

关于
关于 - 海运的博客
分析网站
分析网站 - 海运的博客
文章归档
文章归档 - 海运的博客
参考手册
参考手册 - 海运的博客
在线工具
在线工具 - 海运的博客
常用命令
常用命令 - 海运的博客
centos repo管理使用
centos repo管理使用 - 海运的博客
centos/debian自动通过网络远程安装系统配置脚本
centos/debian自动通过网络远程安装系统配置脚本 - 海运的博客
https://www.haiyun.me/archives/1246.html
IPXE网络引导通过kickstart和preseed自动安装centos/ubuntu/debian系统 - 海运的博客
https://www.haiyun.me/archives/1249.html
使用kickstart安装ubuntu - 海运的博客
Centos/linux ipv4优先
Centos/linux ipv4优先 - 海运的博客
1
海运的博客
2
海运的博客
3
海运的博客
4
海运的博客
153
海运的博客
PHP
PHP - 海运的博客
IIS
IIS - 海运的博客
Mail
Mail - 海运的博客
DNS
DNS - 海运的博客
Cacti
Cacti - 海运的博客
Squid
Squid - 海运的博客
Nagios
Nagios - 海运的博客
Puppet
Puppet - 海运的博客
CentOS
CentOS - 海运的博客
Iptables
Iptables - 海运的博客
RADIUS
RADIUS - 海运的博客
OpenWrt
OpenWrt - 海运的博客
DD-WRT
DD-WRT - 海运的博客
VMware
VMware - 海运的博客
网站程序
网站程序 - 海运的博客
备份存储
备份存储 - 海运的博客
常用软件
常用软件 - 海运的博客
日记分析
日记分析 - 海运的博客
Linux基础
Linux基础 - 海运的博客
欧诺代理
欧诺代理 - 海运的博客
Linux服务
Linux服务 - 海运的博客
系统监控
系统监控 - 海运的博客
流量监控
流量监控 - 海运的博客
虚拟化
虚拟化 - 海运的博客
伪静态
伪静态 - 海运的博客
LVM
LVM - 海运的博客
Shell
Shell - 海运的博客
高可用
高可用 - 海运的博客
数据库
数据库 - 海运的博客
FreeBSD
FreeBSD - 海运的博客
网络安全
网络安全 - 海运的博客
Windows
Windows - 海运的博客
网络工具
网络工具 - 海运的博客
控制面板
控制面板 - 海运的博客
系统调优
系统调优 - 海运的博客
Cisco
Cisco - 海运的博客
VPN
VPN - 海运的博客
ROS
ROS - 海运的博客
Vim
Vim - 海运的博客
KMS
KMS - 海运的博客
PXE
PXE - 海运的博客
Mac
Mac - 海运的博客
Git
Git - 海运的博客
PE
PE - 海运的博客
LNS
LNS - 海运的博客
Xshell
Xshell - 海运的博客
Firefox
Firefox - 海运的博客
Cygwin
Cygwin - 海运的博客
OpenSSL
OpenSSL - 海运的博客
Sandboxie
Sandboxie - 海运的博客
StrokesPlus
StrokesPlus - 海运的博客
AutoHotKey
AutoHotKey - 海运的博客
Total Commander
Total Commander - 海运的博客
WordPress
WordPress - 海运的博客
iMacros
iMacros - 海运的博客
Typecho
Typecho - 海运的博客
Ollydbg
Ollydbg - 海运的博客
Photoshop
Photoshop - 海运的博客
正则
正则 - 海运的博客
Debian
Debian - 海运的博客
Python
Python - 海运的博客
NoSQL
NoSQL - 海运的博客
消息队列
消息队列 - 海运的博客
JS
JS - 海运的博客
Tmux
Tmux - 海运的博客
GO
GO - 海运的博客
HHVM
HHVM - 海运的博客
算法
算法 - 海运的博客
Docker
Docker - 海运的博客
initrd.img解压与打包
initrd.img解压与打包 - 海运的博客
qq smtp 465/587端口区别
qq smtp 465/587端口区别 - 海运的博客

Haiyun.me Spined HTML


正则 - 海运的博客 海运的博客 首页 关于 分析网站 文章归档 参考手册 在线工具 常用命令 正则表达式中哪些字符需要转义 发布时间:August 12, 2013 // 分类:正则 // No Comments 以下字符在正则中都有特定的含义,如需匹配字符本身需要使用转义。 ^ 匹配字符串的开始位置 $ 匹配字符串的结尾位置 * 匹配前面的子表达式零次或多次 . 匹配除换行符n之外的任何单字符 ? 匹配前面的子表达式零次或一次 </td> 转义下个字符 | 指明两项之间的一个选择 () 标记一个子表达式 {} 标记限定符表达式 [] 标记一个中括号表达式 () 标记一个子表达式的开始和结束位置 常见几种正则表达式区别 发布时间:August 9, 2013 // 分类:正则 // 1 Comment 字符 说明 Basic RegEx Extended RegEx python RegEx Perl regEx 转义   </td> </td> </td> </td> ^ 匹配行首,例如'^dog'匹配以字符串dog开头的行(注意:awk 指令中,'^'则是匹配字符串的开始) ^ ^ ^ ^ $ 匹配行尾,例如:'^、dog$'匹配以字符串 dog 为结尾的行(注意:awk 指令中,'$'则是匹配字符串的结尾) $ $ $ $ <p>^$</p> <p>匹配空行</p> ^$ ^$ ^$ ^$ ^string$ 匹配行,例如:'^dog$'匹配只含一个字符串 dog 的行 ^string$ ^string$ ^string$ ^string$ &lt; 匹配单词,例如:'&lt;frog' (等价于'bfrog'),匹配以 frog 开头的单词 &lt; &lt; 不支持 不支持(但可以使用b来匹配单词,例如:'bfrog') <p>&gt;</p> 匹配单词,例如:'frog&gt;'(等价于'frogb '),匹配以 frog 结尾的单词 &gt; &gt; 不支持 不支持(但可以使用b来匹配单词,例如:'frogb') <p>&lt;x&gt;</p> 匹配一个单词或者一个特定字符,例如:'&lt;frog&gt;'(等价于'bfrogb')、'&lt;G&gt;' &lt;x&gt; &lt;x&gt; 不支持 不支持(但可以使用b来匹配单词,例如:'bfrogb' <p>()</p> 匹配表达式,例如:不支持'(frog)' 不支持(但可以使用(),如:(dog) () () () <p>()</p> 匹配表达式,例如:不支持'(frog)' () 不支持(同()) 不支持(同()) 不支持(同()) <p>?</p> 匹配前面的子表达式 0 次或 1 次(等价于{0,1}),例如:where(is)?能匹配"where" 以及"whereis" 不支持(同?) ? ? ? ? 匹配前面的子表达式 0 次或 1 次(等价于'{0,1}'),例如:'where(is)? '能匹配 "where"以及"whereis" ? 不支持(同?) 不支持(同?) 不支持(同?) ? 当该字符紧跟在任何一个其他限制符(*, +, ?, {n},{n,}, {n,m}) 后面时,匹配模式是非贪婪的。非贪婪模式尽可能少的匹配所搜索的字符串,而默认的贪婪模式则尽可能多的匹配所搜索的字符串。例如,对于字符串 "oooo",'o+?' 将匹配单个"o",而 'o+' 将匹配所有 'o' 不支持 不支持 不支持 不支持 . 匹配除换行符('n')之外的任意单个字符(注意:awk 指令中的句点能匹配换行符) . .(如果要匹配包括“n”在内的任何一个字符,请使用:'(^$)|(.) . .(如果要匹配包括“n”在内的任何一个字符,请使用:' [.n] ' * 匹配前面的子表达式 0 次或多次(等价于{0, }),例如:zo* 能匹配 "z"以及 "zoo" * * * * + 匹配前面的子表达式 1 次或多次(等价于'{1, }'),例如:'where(is)+ '能匹配 "whereis"以及"whereisis" + 不支持(同+) 不支持(同+) 不支持(同+) + 匹配前面的子表达式 1 次或多次(等价于{1, }),例如:zo+能匹配 "zo"以及 "zoo",但不能匹配 "z" 不支持(同+) + + + <p>{n}</p> n 必须是一个 0 或者正整数,匹配子表达式 n 次,例如:zo{2}能匹配 不支持(同{n}) {n} {n} {n} {n,} "zooz",但不能匹配 "Bob"n 必须是一个 0 或者正整数,匹配子表达式大于等于 n次,例如:go{2,} 不支持(同{n,}) {n,} {n,} {n,} {n,m} 能匹配 "good",但不能匹配 godm 和 n 均为非负整数,其中 n <= m,最少匹配 n 次且最多匹配 m 次 ,例如:o{1,3}将配"fooooood" 中的前三个 o(请注意在逗号和两个数之间不能有空格) 不支持(同{n,m}) {n,m} {n,m} {n,m} <p>x|y</p> 匹配 x 或 y,例如: 不支持'z|(food)' 能匹配 "z" 或"food";'(z|f)ood' 则匹配"zood" 或 "food" 不支持(同x|y) x|y x|y x|y <p>[0-9]</p> 匹配从 0 到 9 中的任意一个数字字符(注意:要写成递增) [0-9] [0-9] [0-9] [0-9] <p>[xyz]</p> 字符集合,匹配所包含的任意一个字符,例如:'[abc]'可以匹配"lay" 中的 'a'(注意:如果元字符,例如:. *等,它们被放在[ ]中,那么它们将变成一个普通字符) [xyz] [xyz] [xyz] [xyz] <p>1</p> 负值字符集合,匹配未包含的任意一个字符(注意:不包括换行符),例如:'2' 可以匹配 "Lay" 中的'L'(注意:1在awk 指令中则是匹配未包含的任意一个字符+换行符) 1 1 1 1 [A-Za-z] 匹配大写字母或者小写字母中的任意一个字符(注意:要写成递增) [A-Za-z] [A-Za-z] [A-Za-z] [A-Za-z] 3 匹配除了大写与小写字母之外的任意一个字符(注意:写成递增) 3 3 3 3 <p>d</p> 匹配从 0 到 9 中的任意一个数字字符(等价于 [0-9]) 不支持 不支持 d d <p>D</p> 匹配非数字字符(等价于 4) 不支持 不支持 D D S 匹配任何非空白字符(等价于5) 不支持 不支持 S S s 匹配任何空白字符,包括空格、制表符、换页符等等(等价于[ fnrtv]) 不支持 不支持 s s W <p>匹配任何非单词字符 (等价于6)</p> W W W W w 匹配包括下划线的任何单词字符(等价于[A-Za-z0-9_]) w w w w B 匹配非单词边界,例如:'erB' 能匹配 "verb" 中的'er',但不能匹配"never" 中的'er' B B B B <p>b</p> 匹配一个单词边界,也就是指单词和空格间的位置,例如: 'erb' 可以匹配"never" 中的 'er',但不能匹配 "verb" 中的'er' b b b b t 匹配一个横向制表符(等价于 x09和 cI) 不支持 不支持 t t v 匹配一个垂直制表符(等价于 x0b和 cK) 不支持 不支持 v v n 匹配一个换行符(等价于 x0a 和cJ) 不支持 不支持 n n f 匹配一个换页符(等价于x0c 和cL) 不支持 不支持 f f r 匹配一个回车符(等价于 x0d 和cM) 不支持 不支持 r r \ 匹配转义字符本身"" \ \ \ \ <p>cx</p> 匹配由 x 指明的控制字符,例如:cM匹配一个Control-M 或回车符,x 的值必须为A-Z 或 a-z 之一,否则,将 c 视为一个原义的 'c' 字符 不支持 不支持   cx <p>xn</p> 匹配 n,其中 n 为十六进制转义值。十六进制转义值必须为确定的两个数字长,例如:'x41' 匹配 "A"。'x041' 则等价于'x04' & "1"。正则表达式中可以使用 ASCII 编码 不支持 不支持   xn <p>num</p> 匹配 num,其中 num是一个正整数。表示对所获取的匹配的引用 不支持 num num   [:alnum:] 匹配任何一个字母或数字([A-Za-z0-9]),例如:'[[:alnum:]] ' [:alnum:] [:alnum:] [:alnum:] [:alnum:] [:alpha:] 匹配任何一个字母([A-Za-z]), 例如:' [[:alpha:]] ' [:alpha:] [:alpha:] [:alpha:] [:alpha:] [:digit:] 匹配任何一个数字([0-9]),例如:'[[:digit:]] ' [:digit:] [:digit:] [:digit:] [:digit:] [:lower:] 匹配任何一个小写字母([a-z]), 例如:' [[:lower:]] ' [:lower:] [:lower:] [:lower:] [:lower:] [:upper:] 匹配任何一个大写字母([A-Z]) [:upper:] [:upper:] [:upper:] [:upper:] [:space:] 任何一个空白字符: 支持制表符、空格,例如:' [[:space:]] ' [:space:] [:space:] [:space:] [:space:] [:blank:] 空格和制表符(横向和纵向),例如:'[[:blank:]]'ó'[stv]' [:blank:] [:blank:] [:blank:] [:blank:] [:graph:] 任何一个可以看得见的且可以打印的字符(注意:不包括空格和换行符等),例如:'[[:graph:]] ' [:graph:] [:graph:] [:graph:] [:graph:] [:print:] 任何一个可以打印的字符(注意:不包括:[:cntrl:]、字符串结束符'0'、EOF 文件结束符(-1), 但包括空格符号),例如:'[[:print:]] ' [:print:] [:print:] [:print:] [:print:] <p>[:cntrl:]</p> 任何一个控制字符(ASCII 字符集中的前 32 个字符,即:用十进制表示为从 0 到31,例如:换行符、制表符等等),例如:' [[:cntrl:]]' <p>[:cntrl:]</p> <p>[:cntrl:]</p> <p>[:cntrl:]</p> <p>[:cntrl:]</p> [:punct:] 任何一个标点符号(不包括:[:alnum:]、[:cntrl:]、[:space:]这些字符集) [:punct:] [:punct:] [:punct:] [:punct:] [:xdigit:] 任何一个十六进制数(即:0-9,a-f,A-F) [:xdigit:] [:xdigit:] [:xdigit:] [:xdigit:] xyz ↩abc ↩A-Za-z ↩0-9 ↩fnrtv ↩A-Za-z0-9_ ↩ 常用正则表达式 发布时间:August 9, 2013 // 分类:正则 // No Comments <h1>常用正则表达式</h1> <p>说明:正则表达式通常用于两种任务:1.验证,2.搜索/替换。用于验证时,通常需要在前后分别加上^和$,以匹配整个待验证字符串;搜索/替换时是否加上此限定则根据搜索的要求而定,此外,也有可能要在前后加上\b而不是^和$。此表所列的常用正则表达式,除个别外均未在前后加上任何限定,请根据需要,自行处理。</p> <table> <thead> <tr> <th>说明</th> <th>正则表达式</th> </tr> </thead> <tr> <td>网址(URL)</td> <td><span class="regex">[a-zA-z]+://[^\s]*</span></td> </tr> <tr> <td>IP地址(IP Address)</td> <td><span class="regex">((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)</span></td> </tr> <tr> <td>电子邮件(Email)</td> <td><span class="regex">\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*</span></td> </tr> <tr> <td>QQ号码</td> <td><span class="regex">[1-9]\d{4,}</span></td> </tr> <tr> <td>HTML标记(包含内容或自闭合)</td> <td><span class="regex">&lt;(.*)(.*)&gt;.*&lt;\/\1&gt;|&lt;(.*) \/&gt;</span></td> </tr> <tr> <td>密码(由数字/大写字母/小写字母/标点符号组成,四种都必有,8位以上)</td> <td><span class="regex">(?=^.{8,}$)(?=.*\d)(?=.*\W+)(?=.*[A-Z])(?=.*[a-z])(?!.*\n).*$</span></td> </tr> <tr> <td>日期(年-月-日)</td> <td><span class="regex">(\d{4}|\d{2})-((1[0-2])|(0?[1-9]))-(([12][0-9])|(3[01])|(0?[1-9]))</span></td> </tr> <tr> <td>日期(月/日/年)</td> <td><span class="regex">((1[0-2])|(0?[1-9]))/(([12][0-9])|(3[01])|(0?[1-9]))/(\d{4}|\d{2})</span></td> </tr> <tr> <td>时间(小时:分钟, 24小时制)</td> <td><span class="regex">((1|0?)[0-9]|2[0-3]):([0-5][0-9])</span></td> </tr> <tr> <td>汉字(字符)</td> <td><span class="regex">[\u4e00-\u9fa5]</span></td> </tr> <tr> <td>中文及全角标点符号(字符)</td> <td><span class="regex">[\u3000-\u301e\ufe10-\ufe19\ufe30-\ufe44\ufe50-\ufe6b\uff01-\uffee]</span></td> </tr> <tr> <td>中国大陆固定电话号码</td> <td><span class="regex">(\d{4}-|\d{3}-)?(\d{8}|\d{7})</span></td> </tr> <tr> <td>中国大陆手机号码</td> <td><span class="regex">1\d{10}</span></td> </tr> <tr> <td>中国大陆邮政编码</td> <td><span class="regex">[1-9]\d{5}</span></td> </tr> <tr> <td>中国大陆身份证号(15位或18位)</td> <td><span class="regex">\d{15}(\d\d[0-9xX])?</span></td> </tr> <tr> <td>非负整数(正整数或零)</td> <td><span class="regex">\d+</span></td> </tr> <tr> <td>正整数</td> <td><span class="regex">[0-9]*[1-9][0-9]*</span></td> </tr> <tr> <td>负整数</td> <td><span class="regex">-[0-9]*[1-9][0-9]*</span></td> </tr> <tr> <td>整数</td> <td><span class="regex">-?\d+</span></td> </tr> <tr> <td>小数</td> <td><span class="regex">(-?\d+)(\.\d+)?</span></td> </tr> <tr> <td>不包含abc的单词</td> <td><span class="regex">\b((?!abc)\w)+\b</span></td> </tr>原文:http://deerchao.net/tutorials/regex/common.htm 分类 Apache (13)Nginx (42)PHP (83)IIS (8)Mail (17)DNS (14)Cacti (14)Squid (5)Nagios (4)Puppet (7)CentOS (13)Iptables (23)RADIUS (3)OpenWrt (40)DD-WRT (1)VMware (9)网站程序 (3)备份存储 (11)常用软件 (20)日记分析 (10)Linux基础 (18)欧诺代理 (2)Linux服务 (18)系统监控 (4)流量监控 (7)虚拟化 (28)伪静态 (2)LVM (3)Shell (18)高可用 (2)数据库 (16)FreeBSD (3)网络安全 (25)Windows (35)网络工具 (22)控制面板 (3)系统调优 (10)Cisco (3)VPN (5)ROS (20)Vim (14)KMS (4)PXE (2)Mac (1)Git (1)PE (1)LNS (2)Xshell (7)Firefox (13)Cygwin (4)OpenSSL (9)Sandboxie (3)StrokesPlus (1)AutoHotKey (4)Total Commander (2)WordPress (3)iMacros (6)Typecho (2)Ollydbg (1)Photoshop (1)正则 (3)Debian (3)Python (8)NoSQL (6)消息队列 (4)JS (7)Tmux (3)GO (7)HHVM (2)算法 (1)Docker (2) 最新文章 centos repo管理使用centos/debian自动通过网络远程安装系统配置脚本使用kickstart安装ubuntuCentos/linux ipv4优先BT/utorrent连接加密及标志IPXE网络引导通过kickstart和preseed自动安装centos/ubuntu/debian系统ubuntu 通过ppa源安装最新版qbittorrentinitrd.img解压与打包libtorrent提高上传速度qq smtp 465/587端口区别 最近回复 404NTF: 交叉编译的作用是? 404NTF: 请教一下 CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go ... 小智: 安利个PHP开发以太坊区块链的教程: http://xc.hubwiz.com/course/... 陈浩南: 您好,您教程中的 dev.openwrt.org.cn 现在似乎不可用了。请问现在应该在哪里下... 斑马斑马: 怎么查看虚拟机CPU 内存使用情况 zzg: http://downloads.openwrt.org.cn/PandoraBox/rali... xiongrui: 看图 傻狍子: filebrowser好像和这功能一样? https://github.com/filebro... 陶国文: 想看看能不能安装 傻狍子: 服务端设置了用户名密码认证的话,在openwrt的openvpn客户端的配置文件当中该如何更改... Copyright © 2011 海运的博客 / 文章归档 / Archives Rss / Comments Rss / Powered By Typecho 页面执行耗时:0.0493秒。-->