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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
62
Other Decks in Technology
See All in Technology
今のWordPress の制作手法ってなにがあんねん?(改) / What’s the Deal with WordPress Development These Days?
tbshiki
0
480
プラットフォームエンジニアリングはAI時代の開発者をどう救うのか
jacopen
6
3.6k
脳内メモリ、思ったより揮発性だった
koutorino
0
370
AI駆動AI普及活動 ~ 社内AI活用の「何から始めれば?」をAIで突破する
oracle4engineer
PRO
1
110
[JAWSDAYS2026][D8]その起票、愛が足りてますか?AWSサポートを味方につける、技術的「ラブレター」の書き方
hirosys_
3
190
オレ達はAWS管理をやりたいんじゃない!開発の生産性を爆アゲしたいんだ!!
wkm2
4
540
組織全体で実現する標準監視設計
yuobayashi
3
490
頼れる Agentic AI を支える Datadog のオブザーバビリティ / Powering Reliable Agentic AI with Datadog Observability
aoto
PRO
0
170
us-east-1 に障害が起きた時に、 ap-northeast-1 にどんな影響があるか 説明できるようになろう!
miu_crescent
PRO
13
4.4k
情シスのための生成AI実践ガイド2026 / Generative AI Practical Guide for Business Technology 2026
glidenote
0
270
会社紹介資料 / Sansan Company Profile
sansan33
PRO
16
410k
最強のAIエージェントを諦めたら品質が上がった話 / how quality improved after giving up on the strongest AI agent
kt2mikan
0
190
Featured
See All Featured
HDC tutorial
michielstock
1
550
Documentation Writing (for coders)
carmenintech
77
5.3k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
30 Presentation Tips
portentint
PRO
1
250
Being A Developer After 40
akosma
91
590k
Deep Space Network (abreviated)
tonyrice
0
92
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The Curious Case for Waylosing
cassininazir
0
270
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
220
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
sira's awesome portfolio website redesign presentation
elsirapls
0
190
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