Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
正規表現で心が折れた/Regular expressions broke my heart
Search
cottondesu
January 22, 2024
Science
0
150
正規表現で心が折れた/Regular expressions broke my heart
cottondesu
January 22, 2024
Tweet
Share
More Decks by cottondesu
See All by cottondesu
ヨシケイの撮り忘れを対策したPart2/measures-were-taken-to-prevent-forgetting-to-pick-up-yoshikei-part2
cottondesu
0
29
ヨシケイの取り忘れ対策した / Measures were taken to prevent forgetting to pick up Yoshikei
cottondesu
0
150
開発環境公開ハード編 / Development environment public hardware version
cottondesu
0
150
開発環境公開ソフト編 / Development environment public software edition
cottondesu
0
140
オレオレGASからMakeへの移行を検討してみた / Considering the transition from Ore Ore GAS to Make
cottondesu
0
590
Kanazawa.rb 10周年KPT / Kanazawa.rb 10th Anniversary KPT
cottondesu
0
720
Kanazawa.rb 9周年KPT / Kanazawa.rb 9th Anniversary KPT
cottondesu
0
440
Mac Book Proのバッテリー交換してみた / I replaced the battery in my Mac Book Pro.
cottondesu
0
560
みんなのCSIRTコミュニティ紹介 / Everyone's CSIRT community introduction
cottondesu
0
450
Other Decks in Science
See All in Science
Vibecoding for Product Managers
ibknadedeji
0
110
Collective Predictive Coding as a Unified Theory for the Socio-Cognitive Human Minds
tanichu
0
130
ランサムウェア対策にも考慮したVMware、Hyper-V、Azure、AWS間のリアルタイムレプリケーション「Zerto」を徹底解説
climbteam
0
170
データベース06: SQL (3/3) 副問い合わせ
trycycle
PRO
1
690
データベース02: データベースの概念
trycycle
PRO
2
980
ド文系だった私が、 KaggleのNCAAコンペでソロ金取れるまで
wakamatsu_takumu
2
1.7k
【RSJ2025】PAMIQ Core: リアルタイム継続学習のための⾮同期推論・学習フレームワーク
gesonanko
0
370
HajimetenoLT vol.17
hashimoto_kei
1
110
白金鉱業Vol.21【初学者向け発表枠】身近な例から学ぶ数理最適化の基礎 / Learning the Basics of Mathematical Optimization Through Everyday Examples
brainpadpr
1
400
高校生就活へのDA導入の提案
shunyanoda
0
6.1k
LayerXにおける業務の完全自動運転化に向けたAI技術活用事例 / layerx-ai-jsai2025
shimacos
2
20k
生成検索エンジン最適化に関する研究の紹介
ynakano
2
1.5k
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Balancing Empowerment & Direction
lara
5
780
Code Reviewing Like a Champion
maltzj
527
40k
Building an army of robots
kneath
306
46k
Become a Pro
speakerdeck
PRO
30
5.7k
For a Future-Friendly Web
brad_frost
180
10k
Why Our Code Smells
bkeepers
PRO
340
57k
GraphQLとの向き合い方2022年版
quramy
50
14k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
A Tale of Four Properties
chriscoyier
162
23k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Transcript
ਖ਼نදݱͰ৺͕ંΕͨ LBOB[BXBSCNFFUVQ ݄
!DPUUPO@EFTV 8FCΤϯδχΞෆΤϯδχΞ
ਖ਼نදݱͱʁ
จࣈྻͰจࣈͷΈ߹ΘͤΛর ߹͢ΔͨΊʹ༻͍ΒΕΔύλʔϯ
!<";> a,!<";> !<";>
ຐ๏ͷढจ
ਖ਼نදݱͰղܾͰ͖Δ ͔Θ͔Βͳ͍͚Ͳ
ਖ਼نදݱͰ ৺͕ંΕͨ
Γ͍ͨ͜ͱ
LBOB[BXBSC LBOB[BXBSC ҎԼͷจࣈྻύλʔϯ͕͋Δͱ͢Δɻ Լઢʹ֘͢Δจࣈྻ͕ೖྗ͞Εͨ߹ ҰகՕॴΛTQBODMBTTlIPHFzೖྗจࣈྻTQBOͰ ஔ͍ͨ͠ ྫ ೖྗ͞Εͨจࣈྻ͕[BXBͷ߹ ҎԼͷΑ͏ͳஔ͕͍ͨ͠
LBOB[BXBSC LBOBTQBODMBTTlIPHFz[BXBTQBOSC
ਖ਼نදݱͭΑͭΑ ͷਓୡڭ͑ͯ
Ͱ͢
LBOB[BXBSC LBOB[BXBSC ೖྗจࣈྻɿ[BXB LBOB[BXBSC LBOBTQBODMBTTlIPHFz[BXBTQBOSC ஔ JavaScriptͷྫ str.replace(pattern,rep)
//str:ஔ͖͑ରจࣈྻɹpattern:ਖ਼نදݱɹrep:ஔ͖͑ޙจࣈྻ Rubyͷྫ str.sub(pattern,rep) //str:ஔ͖͑ରจࣈྻɹpattern:ਖ਼نදݱɹrep:ஔ͖͑ޙจࣈྻ
·ͱΊ w ਖ਼نදݱͰ৺͕ંΕͨ w มҊͰରԠ͕ͨ͠৺ͷই༊͑ͳ͍ w มҊޙଓͷ ͱΓ͚ͯɺޙଓͷ ͷจࣈ ྻͷΈஔͯ͠ɺ࠷ޙʹલ෦ͱ݁߹ͰରԠ
w ࠓͷඪਖ਼نදݱͪΐͬͱڧ͘ͳΔ LBOB[BXBSC LBOB[BXBSC ͚ͩ͜͜ஔ