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
正規表現
Search
Yumeto Inaoka
March 01, 2017
Technology
0
220
正規表現
2017/03/01のB3ゼミで発表
Yumeto Inaoka
March 01, 2017
Tweet
Share
More Decks by Yumeto Inaoka
See All by Yumeto Inaoka
文献紹介: Quantity doesn’t buy quality syntax with neural language models
yumeto
1
120
文献紹介: Open Domain Web Keyphrase Extraction Beyond Language Modeling
yumeto
0
160
文献紹介: Self-Supervised_Neural_Machine_Translation
yumeto
0
120
文献紹介: Comparing and Developing Tools to Measure the Readability of Domain-Specific Texts
yumeto
0
120
文献紹介: PAWS: Paraphrase Adversaries from Word Scrambling
yumeto
0
88
文献紹介: Beyond BLEU: Training Neural Machine Translation with Semantic Similarity
yumeto
0
210
文献紹介: EditNTS: An Neural Programmer-Interpreter Model for Sentence Simplification through Explicit Editing
yumeto
0
260
文献紹介: Decomposable Neural Paraphrase Generation
yumeto
0
180
文献紹介: Analyzing the Limitations of Cross-lingual Word Embedding Mappings
yumeto
0
170
Other Decks in Technology
See All in Technology
なぜクラウドサービスで Web コンソールを提供するのか
shuta13
4
2k
Oracle Database Backup Service:サービス概要のご紹介
oracle4engineer
PRO
0
4.1k
20240906_JAWS_Yamanashi_#1_leap_beyond_the_AWS_all_certifications
tsumita
1
270
手軽に始める? おうちサーバーのすゝめ
nyagasan
0
200
Road to Single Activity
yurihondo
1
180
PDF Viewer作成の今までとこれから
hunachi
0
260
Evolving DevOps Teams and Flexible Organizational Culture
kakehashi
1
250
OCI で始める!! Red Hat OpenShift / Get Started OpenShift on OCI
oracle4engineer
PRO
1
110
SAVEPOINT α版
savepoint
0
620
CRTO/CRTL/OSEPの比較・勉強法とAV/EDRの検知実験
chayakonanaika
1
1.1k
20240911_New_Relicダッシュボード活用例
speakerdeckfk
0
100
可視化により内部品質をあげるAIドキュメントリバース/20240910 Hiromitsu Akiba
shift_evolve
0
180
Featured
See All Featured
Making Projects Easy
brettharned
113
5.8k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
354
29k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
36
1.9k
Faster Mobile Websites
deanohume
304
30k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
26
1.9k
YesSQL, Process and Tooling at Scale
rocio
167
14k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.4k
What the flash - Photography Introduction
edds
67
11k
Docker and Python
trallard
39
3k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
27
7.4k
Six Lessons from altMBA
skipperchong
26
3.3k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Transcript
ਖ਼نදݱ #θϛ ࣗવݴޠॲཧݚڀࣨɹҴԬເਓ
ൃද༰ ˗ ਖ਼نදݱͱ ˗ ਖ਼نදݱΛΘͳ͍߹ɾͬͨ߹ ˗ ߏจ ˗ লུɾϝλจࣈ
ਖ਼نදݱͱ ˗ จࣈྻू߹ΛͭͷจࣈྻͰදݱ͢Δํ๏ ˗ ݕࡧͳͲʹར༻͞Ε͍ͯΔ ˗ ଟ͘ͷϓϩάϥϜݴޠͰར༻Մೳ ˗ ݩʑਓݴޠΛද͢खஈͷͭͱͯ͠ಋೖ ˗
ӳޠͩͱ3FHVMBSFYQSFTTJPO ˗ ུͯ͠SF SFHFY SFHFYQ
ਖ਼نදݱΛΘͳ͍߹ ˗ 8JOEPXT8JOEPXTΛݕࡧ os = ["Windows 95", "Windows95", "windows 95",
“windows95”, "Windows 98", "Windows98", "windows 98", “windows98”] print("ok" if s in os else “ng") # Windows95 -> ok # windows 98 -> ok # Windows Me -> ng
ਖ਼نදݱΛͬͨ߹ ˗ 8JOEPXT8JOEPXTΛݕࡧ os = r"[Ww]indows ?9[58]" print("ok" if
re.match(os, s) else “ng") # Windows95 -> ok # windows 98 -> ok # Windows Me -> ng
ਖ਼نදݱΛͬͨ߹ ˗ ܞଳి൪߸Λݕࡧ phone = r"0[789]0-?\d{4}-?\d{4}" print("ok" if re.match(phone,
s) else "ng") # 070-0123-4567 -> ok # 09009876543 -> ok # 06-6012-3456 -> ng
ਖ਼نදݱͷߏจ ˗ ҙͷҰจࣈ ptn = r”r.c.” # rice ->
ok # rich -> ok # rock -> ok # roc -> ng # reach -> ng
ਖ਼نදݱͷߏจ ˗ ಛఆͷҰจࣈ<ʜ> ptn = r”[bdm]ay” # bay ->
ok # day -> ok # may -> ok # way -> ng # say -> ng # pay -> ng
ਖ਼نදݱͷߏจ ˗ จ಄? ptn = r”^re” # reborn ->
ok # revenge -> ok # replay -> ok # preview -> ng # unstable -> ng # alive -> ng
ਖ਼نදݱͷߏจ ˗ จ ptn = r”able$” # movable ->
ok # readable -> ok # able -> ok # stably -> ng # assemble -> ng
ਖ਼نදݱͷߏจ ˗ ճҎ্ͷ܁Γฦ͠ ptn = r”w*” # w
-> ok # ww -> ok # wwww -> ok # -> ok # oh -> ng # yeah -> ng # hey -> ng
ਖ਼نදݱͷߏจ ˗ ճҎ্ͷ܁Γฦ͠ ptn = r”oh+” # oh
-> ok # ohh -> ok # ohhhh -> ok # o -> ng # ok -> ng
ਖ਼نදݱͷߏจ ˗ ճ͔ճ ptn = r”^b?l?ack” # ack
-> ok # lack -> ok # back -> ok # black -> ok # block -> ng # slack -> ng
ਖ਼نදݱͷߏจ ˗ Nճ͔ΒOճ\N O^ ptn = r”^g{2,4}d$” # good
-> ok # goood -> ok # gooood -> ok # gd -> ng # god -> ng # goooood -> ng
লུɾϝλจࣈ ˗ ܻҎ্ͷࣈྻ ptn = r”[0123456789]+”
লུɾϝλจࣈ ˗ ܻҎ্ͷࣈྻ # ptn = r”[0123456789]+” ptn = r”[0-9]+”
লུɾϝλจࣈ ˗ ܻҎ্ͷࣈྻ # ptn = r”[0123456789]+” # ptn =
r”[0-9]+” ptn = r”\d+”
লུɾϝλจࣈ ˗ จࣈҎ্ͷӳখจࣈྻ ptn = r”[abcdefghijklmnopqrstuvwxyz]+”
লུɾϝλจࣈ ˗ จࣈҎ্ͷӳখจࣈྻ # ptn = r”[abcdefghijklmnopqrstuvwxyz]+” ptn = r”[a-z]+”
লུɾϝλจࣈ ˗ ઌ಄͕ӳࣈɺͦΕҎ͕߱ӳࣈຢ@ ptn = r”[a-zA-Z][a-zA-Z_\d]*”
লུɾϝλจࣈ ˗ ઌ಄͕ӳࣈɺͦΕҎ͕߱ӳࣈຢ@ # ptn = r”[a-zA-Z][a-zA-Z_\d]*” ptn = r”[a-zA-Z]\w*”
ਖ਼نදݱͷྫ ˗ 8JOEPXT8JOEPXTΛݕࡧ os = r"[Ww]indows ?9[58]"
ਖ਼نදݱͷྫ ˗ 8JOEPXT8JOEPXTΛݕࡧ os = r"[Ww]indows ?9[58]"
ਖ਼نදݱͷྫ ˗ 8JOEPXT8JOEPXTΛݕࡧ os = r"[Ww]indows ?9[58]"
ਖ਼نදݱͷྫ ˗ 8JOEPXT8JOEPXTΛݕࡧ os = r"[Ww]indows ?9[58]"
ਖ਼نදݱͷྫ ˗ ܞଳి൪߸Λݕࡧ phone = r"0[789]0-?\d{4}-?\d{4}"
ਖ਼نදݱͷྫ ˗ ܞଳి൪߸Λݕࡧ phone = r"0[789]0-?\d{4}-?\d{4}"
ਖ਼نදݱͷྫ ˗ ܞଳి൪߸Λݕࡧ phone = r"0[789]0-?\d{4}-?\d{4}"
ਖ਼نදݱͷྫ ˗ ܞଳి൪߸Λݕࡧ phone = r"0[789]0-?\d{4}-?\d{4}"
ਖ਼نදݱͷྫ ˗ ܞଳి൪߸Λݕࡧ phone = r"0[789]0-?\d{4}-?\d{4}"
ਖ਼نදݱͷྫ ˗ ܞଳి൪߸Λݕࡧ phone = r"0[789]0-?\d{4}-?\d{4}"
ൃදͨ͠༰ ˗ ਖ਼نදݱͱ ˗ ਖ਼نදݱΛΘͳ͍߹ɾͬͨ߹ ˗ ߏจ ˗ লུɾϝλจࣈ