vasco16 Posted May 5, 2009 at 06:44 PM Report #261656 Posted May 5, 2009 at 06:44 PM boas pessoal gostar de saber se é possivel validar uma masked box, por exemplo com este formato >A>A->A>A->A>A
passado Posted May 5, 2009 at 07:10 PM Report #261669 Posted May 5, 2009 at 07:10 PM Penso que ai tens de usar expressoes como esta: http://regexlib.com/ http://www.regular-expressions.info/
vasco16 Posted May 5, 2009 at 07:36 PM Author Report #261677 Posted May 5, 2009 at 07:36 PM Penso que ai tens de usar expressoes como esta: http://regexlib.com/ http://www.regular-expressions.info/ acho que isto nao funciona em vb.net
passado Posted May 5, 2009 at 07:58 PM Report #261692 Posted May 5, 2009 at 07:58 PM acho que isto nao funciona em vb.net Funciona que eu uso http://vbtuga.blogspot.com/2008/03/vbnet-validar-e-mails-usando-o-regex.html
vasco16 Posted May 5, 2009 at 08:06 PM Author Report #261693 Posted May 5, 2009 at 08:06 PM Funciona que eu uso http://vbtuga.blogspot.com/2008/03/vbnet-validar-e-mails-usando-o-regex.html Function EmailAddressCheck(ByVal emailAddress As String) As Boolean ' Pattern ou mascara de verificação Dim pattern As String = "^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$" ' Verifica se o email corresponde a pattern/mascara Dim emailAddressMatch As Match = Regex.Match(emailAddress, pattern) ' Caso corresponda If emailAddressMatch.Success Then Return True Else Return False End If End Function tou com um problema, na linha "Dim emailAddressMatch As Match = Regex.Match(emailAddress, pattern)" o vb nao me reconhece regex.match
passado Posted May 5, 2009 at 08:12 PM Report #261697 Posted May 5, 2009 at 08:12 PM tou com um problema, na linha "Dim emailAddressMatch As Match = Regex.Match(emailAddress, pattern)" o vb nao me reconhece regex.match Tens de fazer um import Imports System.Text.RegularExpressions
vasco16 Posted May 5, 2009 at 08:14 PM Author Report #261698 Posted May 5, 2009 at 08:14 PM Tens de fazer um import Imports System.Text.RegularExpressions sim já está. e nada:S
passado Posted May 5, 2009 at 08:19 PM Report #261703 Posted May 5, 2009 at 08:19 PM Dim emailAddressMatch As Match = Regex.Match(emailAddress.text, pattern) Experimenta colocar assim
passado Posted May 5, 2009 at 08:22 PM Report #261708 Posted May 5, 2009 at 08:22 PM Desculpa, tive a ver bem o codigo e tive a ver onde eu o uso e ai tens de colocar onde escreves o texto que queres validar por exemplo: Textbox.text Entendes?
vasco16 Posted May 5, 2009 at 08:23 PM Author Report #261711 Posted May 5, 2009 at 08:23 PM Desculpa, tive a ver bem o codigo e tive a ver onde eu o uso e ai tens de colocar onde escreves o texto que queres validar por exemplo: Textbox.text Entendes? sim. 😞
bruno1234 Posted May 5, 2009 at 08:55 PM Report #261730 Posted May 5, 2009 at 08:55 PM Fica aqui um site muito bom para testar as Regular Expressions. Também tem as mais comuns disponiveis em baixo. http://tools.netshiftmedia.com/regexlibrary/ Matraquilhos para Android. Gratuito na Play Store. https://play.google.com/store/apps/details?id=pt.bca.matraquilhos
vasco16 Posted May 6, 2009 at 06:36 AM Author Report #261778 Posted May 6, 2009 at 06:36 AM Fica aqui um site muito bom para testar as Regular Expressions. Também tem as mais comuns disponiveis em baixo. http://tools.netshiftmedia.com/regexlibrary/ obrigado:)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now