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
520
正規表現苦手なんです...
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
340
ゲーム音楽が好きすぎて実機から録音したけど需要ありますか?
5mingame2
2
710
コントロールセンターとたたかう
5mingame2
2
2.2k
OpenGLを試すなら
5mingame2
0
580
課金処理とたたかう.pdf
5mingame2
1
770
Emacs meets Vim
5mingame2
1
690
タッチジェスチャーとたたかう
5mingame2
4
700
教えて!Xcode
5mingame2
4
1.6k
つかおう!滑らか移動
5mingame2
0
530
Other Decks in Programming
See All in Programming
HTTP compression in PHP and Symfony apps
dunglas
2
1.7k
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
190
Security_for_introducing_eBPF
kentatada
0
110
return文におけるstd::moveについて
onihusube
1
1.1k
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
[JAWS-UG横浜 #76] イケてるアップデートを宇宙いち早く紹介するよ!
maroon1st
0
460
Haze - Real time background blurring
chrisbanes
1
510
採用事例の少ないSvelteを選んだ理由と それを正解にするためにやっていること
oekazuma
2
1k
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
130
Amazon S3 NYJavaSIG 2024-12-12
sullis
0
100
Effective Signals in Angular 19+: Rules and Helpers
manfredsteyer
PRO
0
100
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
360
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
The Cost Of JavaScript in 2023
addyosmani
45
7k
Making the Leap to Tech Lead
cromwellryan
133
9k
How to Ace a Technical Interview
jacobian
276
23k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
520
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
170
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
98
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-\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n\015"]*)*"))*@(?:[^(} . 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 ͓͠·͍ ΞϓϦධ৴தʂ