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
310
ゲーム音楽が好きすぎて実機から録音したけど需要ありますか?
5mingame2
2
690
コントロールセンターとたたかう
5mingame2
2
2.2k
OpenGLを試すなら
5mingame2
0
580
課金処理とたたかう.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
cmp.Or に感動した
otakakot
3
200
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
300
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
Arm移行タイムアタック
qnighy
0
330
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.7k
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
初めてDefinitelyTypedにPRを出した話
syumai
0
420
Realtime API 入門
riofujimon
0
150
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.3k
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
427
64k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Adopting Sorbet at Scale
ufuk
73
9.1k
Music & Morning Musume
bryan
46
6.2k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
A better future with KSS
kneath
238
17k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Into the Great Unknown - MozCon
thekraken
32
1.5k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Scaling GitHub
holman
458
140k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
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]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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 ͓͠·͍ ΞϓϦධ৴தʂ