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
45
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
83
A arte da composição
mendrone
0
37
Como escolher uma stack para meu projeto?
mendrone
0
31
Future Proof CSS - 2019
mendrone
0
79
Vue.js - O Antes, o Durante e o Depois
mendrone
0
120
Future Proof CSS
mendrone
1
120
High Speed Workflow
mendrone
4
140
Usabilidade - O bom senso é o seu melhor amigo
mendrone
0
89
Um Simples Checkup Pode Salvar a Sua Loja Virtual
mendrone
0
71
Other Decks in Technology
See All in Technology
AI 不只幫你寫 Code: 當專案從 300 暴增到 1500, 我們如何撐住 DevOps
appleboy
0
250
気軽に使える"情報のハブ"としてのNotion活用 〜フロー情報の集積点 と、 Claude Code × Notion AI〜
syucream
1
200
フルAIで個人開発して学んだあれこれ / yuruai vol.1
isaoshimizu
0
130
不要なレビューをAIにまかせて AIコーディングの環境改善を加速した
shoota
1
270
本当の”仕事”を手放せる未来が見えた
mu7889yoon
0
140
コミットの「なぜ」を読む
ota1022
0
120
2026年6月23日 Syncable Tech + Start Python Club にて
hamukazu
0
150
Microsoft のサポートとフィードバック総まとめ
murachiakira
PRO
0
110
Lightning近況報告
kozy4324
0
220
サイバーエージェントにおけるAI推進戦略と変革への取り組み
shotatsuge
0
570
[AWS Summit Japan 2026]迷っているあなたへ_小さな一歩が、やがて自分を助けてくれる
sh_fk2
2
420
Comment regagner la souveraineté de vos données tout en étant payé grâce à Nostr !
rlifchitz
0
200
Featured
See All Featured
Odyssey Design
rkendrick25
PRO
2
710
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
310
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
220
Raft: Consensus for Rubyists
vanstee
141
7.6k
The Limits of Empathy - UXLibs8
cassininazir
1
370
The Curse of the Amulet
leimatthew05
2
13k
Claude Code のすすめ
schroneko
67
230k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
290
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
780
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
340
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