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
Vitor Mendrone
January 23, 2020
Technology
40
0
Share
Expressões Regulares
O mínimo que você precisa saber sobre expressões regulares para parecer um gênio.
Vitor Mendrone
January 23, 2020
More Decks by Vitor Mendrone
See All by Vitor Mendrone
Como se tornar indispensável em um mercado em crise?
mendrone
0
81
A arte da composição
mendrone
0
35
Como escolher uma stack para meu projeto?
mendrone
0
29
Future Proof CSS - 2019
mendrone
0
78
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
88
Um Simples Checkup Pode Salvar a Sua Loja Virtual
mendrone
0
68
Other Decks in Technology
See All in Technology
GCASアップデート(202603-202605)
techniczna
0
210
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.6k
AI-Assisted Contributions and Maintainer Load - PyCon US 2026
pauloxnet
1
180
障害対応のRunbookは作った、でも本当に動くの? AWS FIS で EKS の AZ 障害を再現してみた
tk3fftk
0
110
20260515 ID管理は会社を守る大切な砦!〜🔰情シス向け〜
oidfj
0
650
AI対話分析の夢と、汚いデータの現実 Looker / Dataplex / Dataform で実現する品質ファーストな基盤設計
waiwai2111
0
640
Databricks 月刊サービスアップデートまとめ 2026年04月号
tyosi1212
0
130
アプリブロック機能のつくりかたと、AIとHTMLの不合理な相性の良さについて
kumamotone
1
260
Claude Code / Codex / Kiro に AWS 権限を 渡すとき、何を設計すべきか
k_adachi_01
6
1.7k
freeeで運用しているAIQAについて
qatonchan
1
640
AI 時代の Platform Engineering
recruitengineers
PRO
1
220
既存プロダクトQAから新規プロダクトQAへ
ryotakahashi
0
160
Featured
See All Featured
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
44k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
170
Odyssey Design
rkendrick25
PRO
2
620
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.4k
So, you think you're a good person
axbom
PRO
2
2k
BBQ
matthewcrist
89
10k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
920
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
560
Optimising Largest Contentful Paint
csswizardry
37
3.7k
Discover your Explorer Soul
emna__ayadi
2
1.1k
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