Re: why does eregi match for whitespace when there is none?

From: Date: Fri, 01 Nov 2002 05:47:50 +0000
Subject: Re: why does eregi match for whitespace when there is none?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-122381@lists.php.net to get a copy of this message
I don't think that eregi or ereg consider "\s" as whitespace- Instead, use " " or "\040"- ----- Original Message ----- From: "Peter J. Schoenster" <peter@schoenster.com> To: <php-general@lists.php.net> Sent: Friday, November 01, 2002 4:44 PM Subject: [PHP] why does eregi match for whitespace when there is none? > Here is the example: > > <?php > > $string = 'asfddsaz'; > > if (eregi('\s', $string)) { > echo "Whitespace present"; > }else { > echo "NO Whitespace present"; > } > ?> > > Why does the above return true? There is no whitespace in the string. > What am I missing? > > Peter > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#122381) next »