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
自己紹介 / who-am-i
yasulab
PRO
5
6.3k
IKIGAI World Fes:program
tsutsumi
1
2.6k
AIで日本はどう進化する? 〜キミが生きる2035年の地図〜
behomazn
0
110
あなたの言葉に力を与える、演繹的なアプローチ
logica0419
1
270
Measuring your measuring
jonoalderson
1
350
Introduction - Lecture 1 - Advanced Topics in Big Data (4023256FNR)
signer
PRO
1
2.2k
MySmartSTEAM 2526
cbtlibrary
0
190
Going over the Edge
jonoalderson
0
340
The World That Saved Me: A Story of Community and Gratitude
_hashimo2
3
510
Chapitre_2_-_Partie_2.pdf
bernhardsvt
0
160
Introduction - Lecture 1 - Next Generation User Interfaces (4018166FNR)
signer
PRO
1
4.4k
渡辺研Slackの使い方 / Slack Local Rule
kaityo256
PRO
10
11k
Featured
See All Featured
Technical Leadership for Architectural Decision Making
baasie
1
240
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
140
What does AI have to do with Human Rights?
axbom
PRO
0
2k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
450
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
160
Believing is Seeing
oripsolob
1
54
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
340
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
Amusing Abliteration
ianozsvald
0
100
Game over? The fight for quality and originality in the time of robots
wayneb77
1
120
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