Re: regex problem with '@'

From: Date: Wed, 04 Oct 2000 14:54:08 +0000
Subject: Re: regex problem with '@'
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-18596@lists.php.net to get a copy of this message
Hi Tony, What are you trying to accomplish? If you simply want to check for the existance of "@" in a string, use strstr(), it is quicker than ereg anyways. if strstr($line,'@') Monte Tony Bailey wrote: > > That would be useful if: > > a) I was validating an email which I am not > b) it was a supported function which it is not (under the version I > quoted in last mail) > c) I understood it which I do not but probably will if I had the time > to after solving the current problem :-) > > Ta anyway > > Tony > > On Wed, 04 Oct 2000 15:55:12 +0200, Wico de Leeuw wrote: > > > function Validate_Email ($email) { > > > > return(preg_match("'^[a-z0-9_.=-]+@(?:[a-z0-9-]+\.)+([a-z]{2,3})\$'i", > >$email)); > > } > > > > > >At 14:38 4-10-00 +0100, Tony Bailey wrote: > >>Well tried all that still doesn't work. > >> > >>i.e. "\@" "[@]" and various other unlikely combinations > >> > >>Strange thing is that a similar eregi_replace does work using "\@" > >> > >>I should add that the antiquated server I am [trying] using this on has > >>php 3.0.1 - and I can't get it changed so maybe there was a bug in such > >>an early release? > >> > >>Tony > >> > >>--Original Message Text--- > >>From: Maxim Maletsky > >>Date: Wed, 4 Oct 2000 22:28:18 +0900 > >> > >>I think you should both read this: > >>http://www.phpbuilder.com/columns/dario19990616.php3 > >> > >>Cheers! > >> > >> > >>Maxim Maletsky - maxim@j-door.com > >>Webmaster, J-Door.com / J@pan Inc. > >>LINC Media, Inc. > >>TEL: 03-3499-2175 x 1271 > >>FAX: 03-3499-3109 > >> > >>http://www.j-door.com > >>http://www.japaninc.net > >>http://www.lincmedia.co.jp > >> > >> > >> > >> > >> > >>-- > >>PHP General Mailing List (http://www.php.net/) > >>To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > >>For additional commands, e-mail: php-general-help@lists.php.net > >>To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#18596) next »