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
多火工作室
May 09, 2015
Education
0
71
regular expressions
多火工作室#技术群殴#
多火工作室
May 09, 2015
Tweet
Share
More Decks by 多火工作室
See All by 多火工作室
github&git
luxiaojijan
1
240
Nodejs实现RESTful api
luxiaojijan
1
140
机器人餐厅
luxiaojijan
0
97
做全栈的java开发者
luxiaojijan
0
110
python的介绍与web实战
luxiaojijan
0
110
Other Decks in Education
See All in Education
『会社を知ってもらう』から『安心して活躍してもらう』までの プロセスとフロー
sasakendayo
0
240
Human-AI Interaction - Lecture 11 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
480
情報科学類で学べる専門科目38選
momeemt
0
250
予習動画
takenawa
0
11k
Data Physicalisation - Lecture 9 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
460
プレゼンテーション実践
takenawa
0
10k
JOAI2025講評 / joai2025-review
upura
0
230
ビジネスモデル理解
takenawa
0
11k
Implicit and Cross-Device Interaction - Lecture 10 - Next Generation User Interfaces (4018166FNR)
signer
PRO
2
1.7k
2025年度春学期 統計学 第14回 分布についての仮説を検証する ー 仮説検定(1) (2025. 7. 10)
akiraasano
PRO
0
120
America and the World
oripsolob
0
520
2025年度春学期 統計学 第3回 クロス集計と感度・特異度,データの可視化 (2025. 4. 24)
akiraasano
PRO
0
200
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
100
5.7k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
Into the Great Unknown - MozCon
thekraken
40
1.9k
How to Ace a Technical Interview
jacobian
278
23k
Producing Creativity
orderedlist
PRO
346
40k
A Tale of Four Properties
chriscoyier
160
23k
Art, The Web, and Tiny UX
lynnandtonic
301
21k
Visualization
eitanlees
146
16k
Optimizing for Happiness
mojombo
379
70k
Building a Modern Day E-commerce SEO Strategy
aleyda
42
7.4k
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