Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

regex cpf javascript

CPF
/^d{3}.d{3}.d{3}-d{2}$/


CNPJ
/^d{2}.d{3}.d{3}/d{4}-d{2}$/

both
/(^d{3}.d{3}.d{3}-d{2}$)|(^d{2}.d{3}.d{3}/d{4}-d{2}$)/
 
PREVIOUS NEXT
Tagged: #regex #cpf #javascript
ADD COMMENT
Topic
Name
4+3 =