Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Community Library
How to contribute
x
Regex for the brazilian CNPJ
Open Workspace
PCRE (Legacy)
Match
Created 2015-12-04 21:12
1
Regular Expression
/
^
[
0
-
9
]
{2}
[
\.
]
?
[
0
-
9
]
{3}
[
\.
]
?
[
0
-
9
]
{3}
[
\/
]
?
[
0
-
9
]
{4}
[
-
]
?
[
0
-
9
]
{2}
$
/
Description
A regex for the brazilian document named of CNPJ (Cadastro Nacional de Pessoa Jurídica)
Submitted by
André Ramos (github.com/andrelramos)