RE: [PHP] Checking for plus signs?

From: Date: Fri, 08 Feb 2002 02:20:46 +0000
Subject: RE: [PHP] Checking for plus signs?
Groups: php.general 
Request: Send a blank email to php-general+get-83952@lists.php.net to get a copy of this message
remember to escape the escape character so php passes it onto the reg.ex. function correctly, so: if(eregi("\\+",$variable)) -----Original Message----- From: Tyler Longren [mailto:tyler@captainjack.com] Sent: Friday, February 08, 2002 12:54 PM To: Jim Lucas [php]; Leif K-Brooks; php-general@lists.php.net Subject: Re: [PHP] Checking for plus signs? Actually, all you need is this: if(eregi("\+",$variable)) You only need to escape the + sign once. Tyler ----- Original Message ----- From: "Jim Lucas [php]" <jimphp@bend.com> To: "Leif K-Brooks" <eurleif@buyer-brokerage.com>; <php-general@lists.php.net> Sent: Thursday, February 07, 2002 7:39 PM Subject: Re: [PHP] Checking for plus signs? > try this > > if(eregi("/\+/",$variable)) > > Jim Lucas > ----- Original Message ----- > From: "Leif K-Brooks" <eurleif@buyer-brokerage.com> > To: <php-general@lists.php.net> > Sent: Thursday, February 07, 2002 5:40 PM > Subject: [PHP] Checking for plus signs? > > > > I'm trying "if(eregi("+",$variable)){", but it gives me an error. > > What do > I > > do? > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#83952) next »