Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
regular expressions
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
多火工作室
May 09, 2015
Education
0
79
regular expressions
多火工作室#技术群殴#
多火工作室
May 09, 2015
Tweet
Share
More Decks by 多火工作室
See All by 多火工作室
github&git
luxiaojijan
1
250
Nodejs实现RESTful api
luxiaojijan
1
150
机器人餐厅
luxiaojijan
0
110
做全栈的java开发者
luxiaojijan
0
120
python的介绍与web实战
luxiaojijan
0
110
Other Decks in Education
See All in Education
RGBでも蛍光を!? / RayTracingCamp11
kugimasa
2
380
HyRead2526
cbtlibrary
0
200
20251119 如果是勇者欣美爾的話, 他會怎麼做? 東海資工
pichuang
0
170
【ZEPホスト用メタバース校舎操作ガイド】
ainischool
0
170
【洋書和訳:さよならを待つふたりのために】第1章 出会いとメタファー
yaginumatti
0
240
CSS3 and Responsive Web Design - Lecture 5 - Web Technologies (1019888BNR)
signer
PRO
1
3.1k
Adobe Express
matleenalaakso
1
8.1k
Introduction - Lecture 1 - Next Generation User Interfaces (4018166FNR)
signer
PRO
1
4.4k
卒論の書き方 / Happy Writing
kaityo256
PRO
54
28k
HCI Research Methods - Lecture 7 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
1.3k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
Design Guidelines and Models - Lecture 5 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
1.3k
Featured
See All Featured
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
Site-Speed That Sticks
csswizardry
13
1.1k
It's Worth the Effort
3n
188
29k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
92
Paper Plane
katiecoart
PRO
0
46k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
49k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
140
Joys of Absence: A Defence of Solitary Play
codingconduct
1
290
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
65
The SEO identity crisis: Don't let AI make you average
varn
0
68
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
300
Building AI with AI
inesmontani
PRO
1
690
Transcript
<=?]
/^Hello [Ww]orld.?$/
Regular Expressions ᆞ ᄵ і ղ ൔ
ु༯đᆃ൞હ݆Ĥ
ୄઑđݺگᄖđྀ࢚ϔĆ
/pattern/
None
None
字符串的匹配,查找,替换
POSIX & Unix & Programme Unix tools(vim/vi ) Used by
all programming languages(Perl)
<=?]
// (the construct)
?(zero or one) +(one or more) *(zero or more) {n,m}(only
match n to m)
a* a+ a? a{1,3}
^ (匹配开始) $ (结束匹配) \b (开始或者结束)
[.+*] (匹配.或者+或者*) [^.+*] (匹配除了.+*之外的字符)
\d = [0-9] \w = [A-Za-z0-9] \s = [\t\r\n] —表⽰示范围
(匹配除了换⾏行符之外,任⼀一个字符) a(匹配除⼀一个点符号) 转义
/^Hello [Ww]orld.?$/ 开始符号 精确匹配Hello 匹配W或者w 结束 可能出现0次或者1次
/^Hello [Ww]orld.?$/ Hello World Hello world Hello World!
(http://)?w{3}\.[a-z]+\.com www.google.com http://duohuo.org www.zcool.com.cn
/[0-9]{5}(-[0-9]{4})?/ 12345 12345-6789 123-6789
/[0-9]+(-[0-9]{4})?/ 12345 12345-6789 123-6789
() group
反向引用(Backreferences) 小括号里面的正则捕获内容,会进行分组,每个分组会有一个组号, 第一个出现组号为1,第二个出现组号为2。
/(.o)\1r/ dolor
/\b(?:\d{1,3}\.){3}\d{1,3}\b/ 999.999.999.999