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
リリース8年目のサービスの1800個のERBファイルをViewComponentに移行した方法とその結果
katty0324
5
3.4k
Vue.js学習の振り返り
hiro_xre
2
130
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
470
CSC509 Lecture 08
javiergs
PRO
0
100
Prompt Engineering for Developers @ AWS Community Day Adria 2024
slobodan
0
120
Piniaの現状と今後
waka292
5
1.4k
WEBエンジニア向けAI活用入門
sutetotanuki
0
300
飲食業界向けマルチプロダクトを実現させる開発体制とリアルな現状
hiroya0601
1
390
Tuning GraphQL on Rails
pyama86
2
1k
RailsのPull requestsのレビューの時に私が考えていること
yahonda
5
1.7k
JaSST 24 九州:ワークショップ(は除く)実践!マインドマップを活用したソフトウェアテスト+活用事例
satohiroyuki
0
250
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
300
Featured
See All Featured
Ruby is Unlike a Banana
tanoku
96
11k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
167
49k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
9
670
Teambox: Starting and Learning
jrom
132
8.7k
Designing on Purpose - Digital PM Summit 2013
jponch
115
6.9k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
How STYLIGHT went responsive
nonsquared
95
5.2k
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)<>@,;:".\\\\\[\]\0} . q{00-\037\x80-\xff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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 ͓͠·͍ ΞϓϦධ৴தʂ