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
Nobuyuki Nishiyama
October 18, 2019
Programming
1
510
正規表現苦手なんです...
Regex Festa
https://opt.connpass.com/event/140566/
のLTで使った資料です!
Nobuyuki Nishiyama
October 18, 2019
Tweet
Share
More Decks by Nobuyuki Nishiyama
See All by Nobuyuki Nishiyama
C++ MIX #11 これどう読むの...?
5mingame2
0
300
ゲーム音楽が好きすぎて実機から録音したけど需要ありますか?
5mingame2
2
690
コントロールセンターとたたかう
5mingame2
2
2.2k
OpenGLを試すなら
5mingame2
0
570
課金処理とたたかう.pdf
5mingame2
1
760
Emacs meets Vim
5mingame2
1
690
タッチジェスチャーとたたかう
5mingame2
4
690
教えて!Xcode
5mingame2
4
1.6k
つかおう!滑らか移動
5mingame2
0
520
Other Decks in Programming
See All in Programming
The future of development – Are our jobs getting harder or easier?
hollycummins
1
240
Why Spring Matters to Jakarta EE - and Vice Versa
ivargrimstad
0
610
Importmapを使ったJavaScriptの 読み込みとブラウザアドオンの影響
swamp09
3
1.2k
Going Staff - Keynote edition
pragtob
0
430
WEBエンジニア向けAI活用入門
sutetotanuki
0
290
EventSourcingの理想と現実
wenas
5
2k
推し活の ハイトラフィックに立ち向かう Railsとアーキテクチャ - Kaigi on Rails 2024
falcon8823
6
1.7k
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
4
13k
現場で役立つモデリング 超入門
masuda220
PRO
12
2.6k
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
370
watsonx.ai Dojo #3 プロンプトエンジニアリング入門
oniak3ibm
PRO
0
490
テスト駆動開発✅️
akitoshiga
1
210
Featured
See All Featured
Facilitating Awesome Meetings
lara
49
6k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
280
Into the Great Unknown - MozCon
thekraken
31
1.5k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
504
140k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.8k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
The Pragmatic Product Professional
lauravandoore
31
6.3k
Six Lessons from altMBA
skipperchong
26
3.4k
Teambox: Starting and Learning
jrom
132
8.7k
How to train your dragon (web standard)
notwaldorf
88
5.6k
Building an army of robots
kneath
302
42k
Transcript
3FHFY'FTUB ਖ਼نදݱۤखͳΜͰ͢ʜ ΅ͬͪήʔϜσϕϩού ࢁ৴ߦɹ
͡Ίʹ ͑Β͍ͱ͜ʹདྷͪ·ͬͨͩʜ
ࠓճͷ͓
ਖ਼نදݱͱͷग़ձ͍ ΨϥέʔͷαΠτΛ࡞͍ͬͯΔ࣌ʹ ʮೖྗ͞ΕͨจࣈྻϝʔϧΞυϨε͔ʁʯ Λఆ͢Δඞཁ͕ੜͨ͡ʂ
ਖ਼نදݱͱͷग़ձ͍ ։ൃݴޠ1FSMɻ
ਖ਼نදݱͱͷग़ձ͍ ʮ1FSMϝϞʯͱ͍͏αΠτͰݟͭ ͚ͨʂ IUUQXXXEJOPSKQdPI[BLJQFSMIUN
None
$mail_regex = q{(?:[^(\040)<>@,;:".\\\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\\} . q{\[\]\000-\037\x80-\xff])|"[^\\\\\x80-\xff\n\015"]*(?:\\\\[^\x80-\xff][} . q{^\\\\\x80-\xff\n\015"]*)*")(?:\.(?:[^(\040)<>@,;:".\\\\\[\]\000-\037\x} . q{80-\xff]+(?![^(\040)<>@,;:".\\\\\[\]\000-\037\x80-\xff])|"[^\\\\\x80-} .
q{\xff\n\015"]*(?:\\\\[^\x80-\xff][^\\\\\x80-\xff\n\015"]*)*"))*@(?:[^(} . q{\040)<>@,;:".\\\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,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^(} . q{\040)<>@,;:".\\\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\\\[\]\0} . q{00-\037\x80-\xff])|\[(?:[^\\\\\x80-\xff\n\015\[\]]|\\\\[^\x80-\xff])*} . q{\])(?:\.(?:[^(\040)<>@,;:".\\\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,} . q{;:".\\\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\\\x80-\xff\n\015\[\]]|\\\\[} . q{^\x80-\xff])*\]))*};
ͱݴ͏༁Ͱʜ ʑͷ܇࿅ํ๏ͱ͔ίπͱ͔ ڭ͍͑ͯͩ͘͞ʂ
w5XJUUFS!NJOHBNF w'BDFCPPLNJOHBNF w(JU)VCUFLOJTIJ ͓͠·͍ ΞϓϦධ৴தʂ