Thank you. That was exactly the problem.

Janet


> -----Original Message-----
> From: Charlie Llewellin [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, February 14, 2001 11:00 AM
> To:   [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject:      Re: [PHP] ereg problem
> 
> the - needs to be immediately after the [ to include that character.
> Otherwise it is a range indicator.
> 
> Charlie
> ----- Original Message -----
> From: "CC Zona" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, February 14, 2001 12:56 PM
> Subject: Re: [PHP] ereg problem
> 
> 
> > In article <[EMAIL PROTECTED]>,
> > [EMAIL PROTECTED] (Janet Valade) wrote:
> >
> > >  if (!ereg("^[0-9\-\+\.\ \)\(]{10,}$",$value)) {
> > >
> > > Can anyone tell me why this works for every character except the -. It
> > > doesn't see the hyphen as a valid part of the phone number, even
> though
> it
> > > recognizes the other characters, e.g. + or .
> >
> > Try:
> > if (!ereg("^[0-9+. )(-]{10,}$",$value))
> >
> > --
> > CC
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to