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
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
核軍備撤廃に向けた次の大きな一歩─核兵器を先には使わないと核保有国が約束すること
hide2kano
0
230
【ZEPホスト用メタバース校舎操作ガイド】
ainischool
0
170
TeXで変える教育現場
doratex
1
13k
Leveraging LLMs for student feedback in introductory data science courses (Stats Up AI)
minecr
0
160
160人の中高生にAI・技術体験の講師をしてみた話
shuntatoda
0
300
焦りと不安を、技術力に変える方法 - 新卒iOSエンジニアの失敗談と成長のフレームワーク
hypebeans
1
650
Chapitre_2_-_Partie_3.pdf
bernhardsvt
0
150
0121
cbtlibrary
0
120
10分で学ぶ すてきなモナド
soukouki
1
140
1014
cbtlibrary
0
520
1216
cbtlibrary
0
140
心理学を学び活用することで偉大なスクラムマスターを目指す − 大学とコミュニティを組み合わせた学びの循環 / Becoming a great Scrum Master by learning and using psychology
psj59129
1
1.7k
Featured
See All Featured
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
580
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
320
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
820
The Cost Of JavaScript in 2023
addyosmani
55
9.5k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
730
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
99
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
77
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
410
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
440
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
64
Scaling GitHub
holman
464
140k
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