daily pastebin goal
69%
SHARE
TWEET

Untitled

a guest Mar 19th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. stock IsMail(email[]) {
  2.     new len=strlen(email), cstate=0, i;
  3.     for(i=0;i<len;i++) {
  4.         if((cstate==0 || cstate==1) && (email[i]>='A' && email[i]<='Z')||(email[i]>='0' && email[i]<='9') || (email[i]>='a' && email[i]<='z')  || (email[i]=='.')  || (email[i]=='-')  || (email[i]=='_')) { }
  5.         else {
  6.            if((cstate==0) &&(email[i]=='@')) cstate=1;
  7.            else return false;
  8.         }
  9.     }
  10.     if(cstate<1) return false;
  11.     if(len<6) return false;
  12.     if((email[len-3]=='.') || (email[len-4]=='.') || (email[len-5]=='.')) return true;
  13.     return false;
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top