(27-04-2022, 01:58)HenryGuzman escribió: Puede probar este codigo , pueda que le sirva de ayuda .
Código:
Dim reg As New RegExp
Dim Regex_String As String = "^[_a-z0-9-]+(.[a-z0-9-]+)@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,4})$"
TextLabel2.Text = "Analizando"
Wait 0.5
TextLabel2.Text = ""
If (reg.Match(Trim(txt_Data.Text), Regex_String)) Then
TextLabel2.Text = "correcto"
Else
TextLabel2.Text = "fallo"
Endif
Hola HenryGuzman.
Funciona mucho mejor que el que tengo: "(\\S+@\\S+)", aunque no valida el tipo de dominio.
Las pruebas:
- Nombre de usuario: Validado SI: omoreno@ciaxyz.com
- @: Validado SI: omoreno@ciaxyz.com
- Dominio Organización: Validado SI: omoreno@ciaxyz.com
- Dominio Tipo: Validado NO: omoreno@ciaxyz.com
Gracias por tu código.