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
230
Nodejs实现RESTful api
luxiaojijan
1
140
机器人餐厅
luxiaojijan
0
96
做全栈的java开发者
luxiaojijan
0
110
python的介绍与web实战
luxiaojijan
0
110
Other Decks in Education
See All in Education
OpenSourceSummitJapanを運営してみた話
kujiraitakahiro
0
700
JPCERTから始まる草の根活動~セキュリティ文化醸成のためのアクション~
masakiokuda
0
180
20250625_なんでもCopilot 一年の振り返り
ponponmikankan
0
160
技術勉強会 〜 OAuth & OIDC 入門編 / 20250528 OAuth and OIDC
oidfj
5
1.2k
RELC_2025_KYI
otamayuzak
0
120
生成AIとの上手な付き合い方【公開版】/ How to Get Along Well with Generative AI (Public Version)
handlename
0
470
新卒研修に仕掛ける 学びのサイクル / Implementing Learning Cycles in New Graduate Training
takashi_toyosaki
1
150
今も熱いもの!魂を揺さぶる戦士の儀式:マオリ族のハカ
shubox
0
210
Case Studies and Course Review - Lecture 12 - Information Visualisation (4019538FNR)
signer
PRO
1
2k
ふりかえり研修2025
pokotyamu
0
1.2k
郷土教育モデル事業(香川県小豆島町).pdf
bandg
0
190
Are puppies a ranking factor?
jonoalderson
0
830
Featured
See All Featured
For a Future-Friendly Web
brad_frost
179
9.8k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.8k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
Code Review Best Practice
trishagee
68
18k
Balancing Empowerment & Direction
lara
1
380
A better future with KSS
kneath
239
17k
Gamification - CAS2011
davidbonilla
81
5.3k
Code Reviewing Like a Champion
maltzj
524
40k
The Language of Interfaces
destraynor
158
25k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
490
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