On Wed, February 28, 2007 9:08 pm, Brad wrote:
> I have been having some trouble with the "eregi" function. I have the
> following piece of code in my application:
>
>     function standard_input($input, $min=0, $max=50){
>         if (strlen($input) <= $max and strlen($input) >= $min ) {
>             $pattern = '^[a-z0-9\!\_ \.- ,/]*$';

It means that the bit that hs .- , above makes ZERO sense, because ,
comes before . in ASCII, so you can't do that range you just tried to
do.

Of course, you weren't actually trying to do a RANGE, but when you
tacked ' ,/' onto your pattern, you weren't paying attention to the
fact that - has to be at the very end, or very beginning, or (maybe?)
escaped so that EREG knows it's not a RANGE you are defining, but a
single character in the character set.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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

Reply via email to