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
92
0
Share
regular expressions
多火工作室#技术群殴#
多火工作室
May 09, 2015
More Decks by 多火工作室
See All by 多火工作室
github&git
luxiaojijan
1
260
Nodejs实现RESTful api
luxiaojijan
1
160
机器人餐厅
luxiaojijan
0
130
做全栈的java开发者
luxiaojijan
0
130
python的介绍与web实战
luxiaojijan
0
130
Other Decks in Education
See All in Education
Padlet opetuksessa
matleenalaakso
12
15k
勾配ブースティングと決定木の話 / gradient boosting and decision trees
kaityo256
PRO
6
1.2k
[2026前期火5] 論理学(京都大学文学部 前期 第6回)「かつとまたはの規則」
yatabe
0
210
共感から、つくる: 変わり続ける自分と、誰かのための創造
micknerd
1
370
[2026前期火5] 論理学(京都大学文学部 前期 第4回)「 ならば(→)の導入と証明ネット」
yatabe
0
400
モブ社員がモブエンジニアを名乗って得られたこと_20260413
masakiokuda
4
510
Why the humanities may be your best career bet
figarospeech
0
190
吉祥寺.pmは1つじゃない — 複数イベント並走運営の12年 —
magnolia
0
1.2k
2026年度春学期 統計学 第1回 イントロダクション ー 統計的なものの見方・考え方について (2026. 4. 9)
akiraasano
PRO
0
140
コミュニティを通じた_キャリア設計のススメ_20260424.pdf
masakiokuda
0
290
事業紹介資料(トレーナー養成講座)
kentaro1981
0
420
[2026前期火5] 論理学(京都大学文学部 前期 第5回)「 ならばの問題演習・proof net・かつの規則」
yatabe
0
240
Featured
See All Featured
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
360
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
54k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
960
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
240
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
400
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Odyssey Design
rkendrick25
PRO
2
670
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
320
The Cost Of JavaScript in 2023
addyosmani
55
10k
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