惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
CERT Recently Published Vulnerability Notes
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed
Security Latest
Security Latest
P
Privacy International News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
AI
AI
Cisco Talos Blog
Cisco Talos Blog
K
Kaspersky official blog
S
Secure Thoughts
PCI Perspectives
PCI Perspectives
Simon Willison's Weblog
Simon Willison's Weblog
D
DataBreaches.Net
GbyAI
GbyAI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
罗磊的独立博客
V
Visual Studio Blog
aimingoo的专栏
aimingoo的专栏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
V
V2EX
Last Week in AI
Last Week in AI
有赞技术团队
有赞技术团队
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tenable Blog
T
Threat Research - Cisco Blogs
T
Troy Hunt's Blog
V2EX - 技术
V2EX - 技术
S
Security @ Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
L
Lohrmann on Cybersecurity
F
Full Disclosure
H
Help Net Security
博客园 - Franky
Stack Overflow Blog
Stack Overflow Blog
N
Netflix TechBlog - Medium
Engineering at Meta
Engineering at Meta
A
Arctic Wolf
O
OpenAI News
S
Securelist

博客园 - rainbow727

ps-图层调整大小 js 根据关键字,进行mark背景色标记 时间戳转换为时间格式 ps-图层尺寸缩放 ps-窗口缩放比例调整 bug Extjs小例子 ps-填充色 jq 数组对象,重复数据进行合并 ipv4,ipv6起止地址判断,网段判断 HTML li标签排列有空白间隙 Ext.js知识点纪要 PHP 文件内容处理 知识点小纪要 function函数 正则表达式的字符含义 邮箱正则表达式 jQuery相关面试题 js继承
常用正则表达式
rainbow727 · 2016-10-11 · via 博客园 - rainbow727

常用正则表达式

版本:v0.01 (2011-6-7) 整理:deerchao 转载请注明来源

说明:正则表达式通常用于两种任务:1.验证,2.搜索/替换。用于验证时,通常需要在前后分别加上^和$,以匹配整个待验证字符串;搜索/替换时是否加上此限定则根据搜索的要求而定,此外,也有可能要在前后加上\b而不是^和$。此表所列的常用正则表达式,除个别外均未在前后加上任何限定,请根据需要,自行处理。
说明     正则表达式
网址(URL)     [a-zA-z]+://[^\s]*
IP地址(IP Address)     ((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)
电子邮件(Email)     \w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
QQ号码     [1-9]\d{4,}
HTML标记(包含内容或自闭合)     <(.*)(.*)>.*<\/\1>|<(.*) \/>
密码(由数字/大写字母/小写字母/标点符号组成,四种都必有,8位以上)     (?=^.{8,}$)(?=.*\d)(?=.*\W+)(?=.*[A-Z])(?=.*[a-z])(?!.*\n).*$
日期(年-月-日)     (\d{4}|\d{2})-((0?([1-9]))|(1[1|2]))-((0?[1-9])|([12]([1-9]))|(3[0|1]))
日期(月/日/年)     ((0?[1-9]{1})|(1[1|2]))/(0?[1-9]|([12][1-9])|(3[0|1]))/(\d{4}|\d{2})
时间(小时:分钟, 24小时制)     ((1|0?)[0-9]|2[0-3]):([0-5][0-9])
汉字(字符)     [\u4e00-\u9fa5]
中文及全角标点符号(字符)     [\u3000-\u301e\ufe10-\ufe19\ufe30-\ufe44\ufe50-\ufe6b\uff01-\uffee]
中国大陆固定电话号码     (\d{4}-|\d{3}-)?(\d{8}|\d{7})
中国大陆手机号码     1\d{10}
中国大陆邮政编码     [1-9]\d{5}
中国大陆身份证号(15位或18位)     \d{15}(\d\d[0-9xX])?
非负整数(正整数或零)     \d+
正整数     [0-9]*[1-9][0-9]*
负整数     -[0-9]*[1-9][0-9]*
整数     -?\d+
小数     (-?\d+)(\.\d+)?