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

2002-10-31 Thread rija
I don't think that eregi or ereg consider "\s" as whitespace-
Instead, use " " or "\040"-

- Original Message - 
From: "Peter J. Schoenster" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 01, 2002 4:44 PM
Subject: [PHP] why does eregi match for whitespace when there is none?


> Here is the example:
> 
>  
> $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
> 
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] why does eregi match for whitespace when there is none?

2002-10-31 Thread Peter J. Schoenster
Here is the example:



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