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
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
2 matches
Mail list logo