Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
regular expressions
Search
多火工作室
May 09, 2015
Education
0
77
regular expressions
多火工作室#技术群殴#
多火工作室
May 09, 2015
Tweet
Share
More Decks by 多火工作室
See All by 多火工作室
github&git
luxiaojijan
1
250
Nodejs实现RESTful api
luxiaojijan
1
140
机器人餐厅
luxiaojijan
0
110
做全栈的java开发者
luxiaojijan
0
110
python的介绍与web实战
luxiaojijan
0
110
Other Decks in Education
See All in Education
TeXで変える教育現場
doratex
0
4.2k
Microsoft Office 365
matleenalaakso
0
2k
Портфолио - Шынар Ауелбекова
shynar
0
140
くまのココロンともぐらのロジ
frievea
0
120
1014
cbtlibrary
0
500
Презентация "Знаю Россию"
spilsart
0
370
Web 2.0 Patterns and Technologies - Lecture 8 - Web Technologies (1019888BNR)
signer
PRO
0
3k
1111
cbtlibrary
0
240
RSJ2025 ランチョンセミナー 一歩ずつ世界へ:学生・若手研究者のための等身大の国際化の始め方
t_inamura
0
340
Web Architectures - Lecture 2 - Web Technologies (1019888BNR)
signer
PRO
0
3.3k
GOVERNOR ADDRESS:2025年9月29日合同公式訪問例会:2720 Japan O.K. ロータリーEクラブ、2025年10月6日卓話:藤田 千克由 氏(国際ロータリー第2720地区 2025-2026年度 ガバナー・大分中央ロータリークラブ・大分トキハタクシー(株)顧問)
2720japanoke
0
720
MySmartSTEAM 2526
cbtlibrary
0
160
Featured
See All Featured
Building an army of robots
kneath
306
46k
Bash Introduction
62gerente
615
210k
Done Done
chrislema
186
16k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
A designer walks into a library…
pauljervisheath
210
24k
The Language of Interfaces
destraynor
162
25k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
Balancing Empowerment & Direction
lara
5
800
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