Get Dropox | Luno Bitcoin | Ovex Crypto | Binance | Get Free Crypto - Morpher
Africasgateway.com

PHP is shit

· 5 · 1465

Anonymous

  • Guest
Yo Milk a**ist me here I want a match operator to validate an email address eg

The Match operator for PhoneNumber will be like this(!ereg("^\[0-9] {3}\)[0-9]{3}-[0-9]{4}$",$phone) )

e-mail must be in this form Rhythmic@africasgateway.comor Rhythmic@Africasgateway.co.za

I have been struggling the whole day


briCK

  • Gold digger bait!
  • AG Moderator
  • AG Veteran
  • *****
    • Posts: 6314
    • REP: +9/-10
    • Gender:Male
  • No!!!!! Hoe!
    • View Profile
sub is_valid_local_email_part ($) {
       my ($addr) = @_;
       my $atext = qr/[A-Za-z0-9\!\#\$\%\&\´\*\+\-\/\=\?\^\_\`\{\|\+\~]/;
       my $dot_atom_text = qr/$atext+(\.$atext+)*/;

       my $no_ws_ctl_char = qr/[\x01-\x08\x0b\x0c\x0e-\x1f\x7f]/;
       my $qtext_char = qr/([\x21\x23-\x5b\x5d-\x7e]|$no_ws_ctl_char)/;
       my $text = qr/[\x01-\x09\x0b\x0c\x0e-\x7f]/;
       my $qtext = qr/($qtext_char|\\$text)*/;
       my $quoted_string = qr/"$qtext"/;

       if ( $addr =~ /^($dot_atom_text|$quoted_string)$/ ) {
               return 1;
       } else {
               return 0;
       }
   }
   sub is_valid_email ($) {
       my ($addr) = @_;
       my $atext = qr/[A-Za-z0-9\!\#\$\%\&\´\*\+\-\/\=\?\^\_\`\{\|\+\~]/;
       my $dot_atom_text = qr/$atext+(\.$atext+)*/;

       my $no_ws_ctl_char = qr/[\x01-\x08\x0b\x0c\x0e-\x1f\x7f]/;
       my $qtext_char = qr/([\x21\x23-\x5b\x5d-\x7e]|$no_ws_ctl_char)/;
       my $text = qr/[\x01-\x09\x0b\x0c\x0e-\x7f]/;
       my $qtext = qr/($qtext_char|\\$text)*/;
       my $quoted_string = qr/"$qtext"/;

       my $quotedpair = qr/\\$text/;
       my $dtext = qr/[\x21-\x5a\x5e-\x7e\x01-\x08\x0b\x0c\x0e-\x1f\x7f]/;
       my $dcontent = qr/($dtext|$quotedpair)/;        
       my $domain_literal = qr/\[(${dcontent})*\]/;

       if ( $addr =~ /^($dot_atom_text|$quoted_string)\@($dot_atom_text|$domain_literal)$/ ) {
               return 1;
       } else {
               return 0;
       }
   }



[ This message was edited by: briCK on 02-09-2004 19:36 ]
Trapped In The 90ies Nigga.


Ramorethetho

  • Weed is green paper is brown coke is white you are a bitch so as your wife
  • AG Elite Member
  • *****
    • Posts: 1064
    • REP: +9/-18
    • Gender:Male
  • Linux and Novell f***ed and gave birth to SuSe
    • View Profile
Brick i cant realy get you i think you mix it with perl somewhere
Feeling satisfaction from the street croud reaction


RuSh

  • AG Veteran
  • *****
    • Posts: 4088
    • REP: +1/-0
    • Gender:Male
  • beware of the lioness
    • View Profile
    • www.rushay.org
whats up dudes
live on the lunch table
Touched fables
Ducked labels
cafeter one heat em live for the terrordome stables
Signed to Rawkus
I'd rather be mouth f***ed by Nazis unconscious


briCK

  • Gold digger bait!
  • AG Moderator
  • AG Veteran
  • *****
    • Posts: 6314
    • REP: +9/-10
    • Gender:Male
  • No!!!!! Hoe!
    • View Profile
Quote:

02-09-2004 at 19:45, Rhythmic :
Brick i cant realy get you i think you mix it with perl somewhere




i was too lazy to write the code right so i copied from some shit i done before...but the syntax for the expressions should be the same...and yes it is a perl script...if you read the code..it is very simple you will be able to figure it out..

sorry thats all te help i can
Trapped In The 90ies Nigga.