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
Expressões Regulares
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Vitor Mendrone
January 23, 2020
Technology
0
36
Expressões Regulares
O mínimo que você precisa saber sobre expressões regulares para parecer um gênio.
Vitor Mendrone
January 23, 2020
Tweet
Share
More Decks by Vitor Mendrone
See All by Vitor Mendrone
Como se tornar indispensável em um mercado em crise?
mendrone
0
78
A arte da composição
mendrone
0
29
Como escolher uma stack para meu projeto?
mendrone
0
26
Future Proof CSS - 2019
mendrone
0
76
Vue.js - O Antes, o Durante e o Depois
mendrone
0
110
Future Proof CSS
mendrone
1
110
High Speed Workflow
mendrone
4
140
Usabilidade - O bom senso é o seu melhor amigo
mendrone
0
83
Um Simples Checkup Pode Salvar a Sua Loja Virtual
mendrone
0
61
Other Decks in Technology
See All in Technology
作るべきものと向き合う - ecspresso 8年間の開発史から学ぶ技術選定 / 技術選定con findy 2026
fujiwara3
6
1.6k
AI が Approve する開発フロー / How AI Reviewers Accelerate Our Development
zaimy
1
230
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
14k
Windows ネットワークを再確認する
murachiakira
PRO
0
170
【Developers Summit 2026】Memory Is All You Need:コンテキストの「最適化」から「継続性」へ ~RAGを進化させるメモリエンジニアリングの最前線~
shisyu_gaku
5
840
Serverless Agent Architecture on Azure / serverless-agent-on-azure
miyake
1
110
俺の失敗を乗り越えろ!メーカーの開発現場での失敗談と乗り越え方 ~ゆるゆるチームリーダー編~
spiddle
0
400
AWS CDK の目玉新機能「Mixins」とは / cdk-mixins
gotok365
2
290
オンプレとGoogle Cloudを安全に繋ぐための、セキュア通信の勘所
waiwai2111
3
1k
クラウド時代における一時権限取得
krrrr38
1
140
チームメンバー迷わないIaC設計
hayama17
5
3.2k
2026-02-24 月末 Tech Lunch Online #10 Cloud Runのデプロイの課題から考えるアプリとインフラの境界線
masasuzu
0
100
Featured
See All Featured
Darren the Foodie - Storyboard
khoart
PRO
3
2.7k
The Spectacular Lies of Maps
axbom
PRO
1
570
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
50k
Docker and Python
trallard
47
3.7k
Thoughts on Productivity
jonyablonski
75
5.1k
Building Adaptive Systems
keathley
44
2.9k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
200
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
300
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
110
30 Presentation Tips
portentint
PRO
1
250
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
89
Transcript
None
Vitor Mendrone Founder - Lukin Senior Developer - Work &
Co
/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i
None
Expressões Regulares
String Padrões Combinar Localizar Gerenciar
None
Literal Constante Construtor de Objeto Padrão desconhecido
/pattern/flag New RegExp(pattern, flag)
Pattern /meetup-html/g
Flags /meetup-html/g
G Global I Ignore Case M Multiline
.test() .exec()
.test()
.exec()
Meta-characters \d Dígitos (Igual a [0-9]) \w Alfanuméricos e Underline
(Igual a [a-zA-Z0–9_]) \s Espaços e tabs . Qualquer caractere exceto line-breaks
Quantificadores ^ Inicio da string $ Fim da string +
Uma ou mais vezes
Mais Quantificadores {N} N ocorrências da expressão {N,} N ou
mais ocorrências da expressão {N,M} De N a M ocorrências da expressão
Escape / Alternância \ Escapa o próximo caractere (Ex.: \.)
| Ou
Grouping [] Grupo de caracteres () Grupo de captura
None
Validar um CPF!
Validar um CPF! const cpfRegex = //
Definindo uma flag! (Ou Não) const cpfRegex = //
Adicionando limites const cpfRegex = /^$/
NNN.NNN.NNN-NN \d.\d.\d-\d
const cpfRegex = /^\d$/ Meta-characters!
Quantificadores! const cpfRegex = /^\d\d … const cpfRegex = /^\d{3}&/
Escapando! const cpfRegex = /^\d{3}\.$/
const cpfRegex = /^\d{3}\.\d{3}\.\d{3}\-\d{2}$/
https:/ /regexr.com
Obrigado!
[email protected]
Twitter: @vhmendrone