<%
Option Explicit
Dim TheAt
Dim TheDot
Dim FieldToTest
FieldToTest = "bob@somewhere.com"
If Len(FieldToTest) < 6 then
  Response.Write "Adres e-mail jest nieprawidowy!"
Else
  TheAt = InStr(2, FieldToTest, "@")
  If TheAt = 0 Then
    Response.Write "Adres e-mail jest nieprawidowy!"
  Else
    TheDot = InStr(cint(TheAt) + 2, FieldToTest, ".")
    If TheDot = 0 Then
      Response.Write "Adres e-mail jest nieprawidowy!"
    ElseIf cint(TheDot) + 1 > Len(FieldToTest) Then
      Response.Write "Adres e-mail jest nieprawidowy!"
    Else
      Response.Write "Adres e-mail jest prawidowy!"
    End If
  End If
End If
%>
