Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial - Finished
#5
Better way to do this would be to check for a period AFTER the @, otherwise "glacier86.99@bellsouth" would return true.

Rough idea:
Code:
Dim i As Byte, a As Byte, c As Byte
    For i = 1 To Len(Text1.Text)
        If Mid(Text1.Text, i, 1) = "@" Then
        'Adding 2 will prevent email@.com
        a = a + 2        
            For c = a To Len(Text1.Text)
                    If Mid(Text1.Text, c, 1) = "." Then
                            Return True
                End If
            Next c
        ' Didn't find the period, return false.
        Return False
        End If
    Next i
Used the PHP "return false," but you get the idea.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)