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

2002-10-31 Thread Peter J. Schoenster
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

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