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
130
文献紹介: Open Domain Web Keyphrase Extraction Beyond Language Modeling
yumeto
0
170
文献紹介: 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
93
文献紹介: 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
270
文献紹介: Decomposable Neural Paraphrase Generation
yumeto
0
180
文献紹介: Analyzing the Limitations of Cross-lingual Word Embedding Mappings
yumeto
0
180
Other Decks in Technology
See All in Technology
OCI 運用監視サービス 概要
oracle4engineer
PRO
0
4.8k
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
170
AGIについてChatGPTに聞いてみた
blueb
0
130
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.4k
いざ、BSC討伐の旅
nikinusu
2
780
Lexical Analysis
shigashiyama
1
150
Amazon Personalizeのレコメンドシステム構築、実際何するの?〜大体10分で具体的なイメージをつかむ〜
kniino
1
100
安心してください、日本語使えますよ―Ubuntu日本語Remix提供休止に寄せて― 2024-11-17
nobutomurata
1
1k
Flutterによる 効率的なAndroid・iOS・Webアプリケーション開発の事例
recruitengineers
PRO
0
100
Taming you application's environments
salaboy
0
190
Terraform CI/CD パイプラインにおける AWS CodeCommit の代替手段
hiyanger
1
240
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
2
320
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Six Lessons from altMBA
skipperchong
27
3.5k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Fireside Chat
paigeccino
34
3k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
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}"
ൃදͨ͠༰ ˗ ਖ਼نදݱͱ ˗ ਖ਼نදݱΛΘͳ͍߹ɾͬͨ߹ ˗ ߏจ ˗ লུɾϝλจࣈ