Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

regex cnpj 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 #cnpj #javascript
ADD COMMENT
Topic
Name
8+8 =