Re: [PHP] ereg is failing on this simple test

2003-12-13 Thread Eugene Lee
On Fri, Dec 12, 2003 at 07:54:16PM -0800, Manuel Ochoa wrote: : : Why is this test failing? : : $data = A Simple test.; : If (ereg(^[a-zA-Z0-9\s.\-_']+$, $data)) { : echo Valid text; : } : else { : echo Not valid text; : } You can't use the character class \s within a range. And you need

RE: [PHP] ereg is failing on this simple test

2003-12-12 Thread Dave G
Why is this test failing? If (ereg(^[a-zA-Z0-9\s.\-_']+$, $data)) { I'm very new to PHP, so I may be barking up the wrong tree, but what is that s doing after the slash? I don't know if it's the cause of the problem, but as far as I know it's superfluous. -- Yoroshiku! Dave G [EMAIL