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
IHLヘルスケアリーダーシップ研究会17期説明資料
ihlhealthcareleadership
0
880
1111
cbtlibrary
0
270
学習指導要領と解説に基づく学習内容の構造化の試み / Course of study Commentary LOD JAET 2025
masao
0
120
いわゆる「ふつう」のキャリアを歩んだ人の割合(若者向け)
hysmrk
0
310
Adobe Express
matleenalaakso
1
8.1k
NUTMEG紹介スライド
mugiiicha
0
890
滑空スポーツ講習会2025(実技講習)EMFT学科講習資料/JSA EMFT 2025
jsaseminar
0
230
国際卓越研究大学計画|Science Tokyo(東京科学大学)
sciencetokyo
PRO
0
47k
悩める リーダー達に 届けたい書籍|レジリエントマネジメント 書籍イントロダクション-260126
mimoza60
0
250
Human Perception and Cognition - Lecture 4 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
1.3k
HyRead2526
cbtlibrary
0
200
Featured
See All Featured
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
60
42k
Navigating Weather and Climate Data
rabernat
0
100
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Google's AI Overviews - The New Search
badams
0
900
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
49k
The Limits of Empathy - UXLibs8
cassininazir
1
210
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
51
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.1k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
120
Joys of Absence: A Defence of Solitary Play
codingconduct
1
290
What's in a price? How to price your products and services
michaelherold
247
13k
Crafting Experiences
bethany
1
48
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