Skip to main content

E-mail: "^([-a-zA-Z0-9_-]@(gmail|yahoo|ymail|rocketmail|bol|hotmail|live|msn|ig|globomail|oi|pop|inteligweb|r7|folha|zipmail).(com|info|gov|net|org|tv)(.[-a-z]{2})?)$""^([-a-zA-Z0-9_-]*@(gmail|yahoo|ymail|rocketmail|bol|hotmail|live|msn|ig|globomail|oi|pop|inteligweb|r7|folha|zipmail).(com|info|gov|net|org|tv)(.[-a-z]{2})?)*$"

CPF: "^((\d{3}).(\d{3}).(\d{3})-(\d{2}))*$""^((\d{3}).(\d{3}).(\d{3})-(\d{2}))*$"

CNPJ: "^((\d{2}).(\d{3}).(\d{3})/(\d{4})-(\d{2}))*$""^((\d{2}).(\d{3}).(\d{3})/(\d{4})-(\d{2}))*$"

CPF/CNPF:"^(((\d{3}).(\d{3}).(\d{3})-(\d{2}))?((\d{2}).(\d{3}).(\d{3})/(\d{4})-(\d{2}))?)*$""^(((\d{3}).(\d{3}).(\d{3})-(\d{2}))?((\d{2}).(\d{3}).(\d{3})/(\d{4})-(\d{2}))?)*$"

Ex.: (VB.NET)

Dim hRegex As Regex = New Regex("^(((\d{3}).(\d{3}).(\d{3})-(\d{2}))?((\d{2}).(\d{3}).(\d{3})/(\d{4})-(\d{2}))?)*$", RegexOptions.None)

MsgBox(hRegex.IsMatch($"000.000.000-00")) 'Saída {True|False}

Dim hRegex As Regex = New Regex("^(((\d{3}).(\d{3}).(\d{3})-(\d{2}))?((\d{2}).(\d{3}).(\d{3})/(\d{4})-(\d{2}))?)*$", RegexOptions.None)

MsgBox(hRegex.IsMatch($"000.000.000-00")) 'Saída {True|False}

E-mail: "^([-a-zA-Z0-9_-]@(gmail|yahoo|ymail|rocketmail|bol|hotmail|live|msn|ig|globomail|oi|pop|inteligweb|r7|folha|zipmail).(com|info|gov|net|org|tv)(.[-a-z]{2})?)$"

CPF: "^((\d{3}).(\d{3}).(\d{3})-(\d{2}))*$"

CNPJ: "^((\d{2}).(\d{3}).(\d{3})/(\d{4})-(\d{2}))*$"

CPF/CNPF:"^(((\d{3}).(\d{3}).(\d{3})-(\d{2}))?((\d{2}).(\d{3}).(\d{3})/(\d{4})-(\d{2}))?)*$"

Ex.: (VB.NET)

Dim hRegex As Regex = New Regex("^(((\d{3}).(\d{3}).(\d{3})-(\d{2}))?((\d{2}).(\d{3}).(\d{3})/(\d{4})-(\d{2}))?)*$", RegexOptions.None)

MsgBox(hRegex.IsMatch($"000.000.000-00")) 'Saída {True|False}

E-mail: "^([-a-zA-Z0-9_-]*@(gmail|yahoo|ymail|rocketmail|bol|hotmail|live|msn|ig|globomail|oi|pop|inteligweb|r7|folha|zipmail).(com|info|gov|net|org|tv)(.[-a-z]{2})?)*$"

CPF: "^((\d{3}).(\d{3}).(\d{3})-(\d{2}))*$"

CNPJ: "^((\d{2}).(\d{3}).(\d{3})/(\d{4})-(\d{2}))*$"

CPF/CNPF:"^(((\d{3}).(\d{3}).(\d{3})-(\d{2}))?((\d{2}).(\d{3}).(\d{3})/(\d{4})-(\d{2}))?)*$"

Ex.: (VB.NET)

Dim hRegex As Regex = New Regex("^(((\d{3}).(\d{3}).(\d{3})-(\d{2}))?((\d{2}).(\d{3}).(\d{3})/(\d{4})-(\d{2}))?)*$", RegexOptions.None)

MsgBox(hRegex.IsMatch($"000.000.000-00")) 'Saída {True|False}
Fonte Link

E-mail: "^([-a-zA-Z0-9_-]@(gmail|yahoo|ymail|rocketmail|bol|hotmail|live|msn|ig|globomail|oi|pop|inteligweb|r7|folha|zipmail).(com|info|gov|net|org|tv)(.[-a-z]{2})?)$"

CPF: "^((\d{3}).(\d{3}).(\d{3})-(\d{2}))*$"

CNPJ: "^((\d{2}).(\d{3}).(\d{3})/(\d{4})-(\d{2}))*$"

CPF/CNPF:"^(((\d{3}).(\d{3}).(\d{3})-(\d{2}))?((\d{2}).(\d{3}).(\d{3})/(\d{4})-(\d{2}))?)*$"

Ex.: (VB.NET)

Dim hRegex As Regex = New Regex("^(((\d{3}).(\d{3}).(\d{3})-(\d{2}))?((\d{2}).(\d{3}).(\d{3})/(\d{4})-(\d{2}))?)*$", RegexOptions.None)

MsgBox(hRegex.IsMatch($"000.000.000-00")) 'Saída {True|False}