In article <[EMAIL PROTECTED]>, Rinku wrote:
> --0-775821546-1089528419=:27331
> Content-Type: text/plain; charset=us-ascii
> Pls guide on following.
> 1) I want to validate name for a alphabetic value, But if I give space between 2 
> words then its not supporting..

That's correct behaviour. The alphabet doesn't know what a space is ;)
Thus append the other allowed characters to your a-zA-Z interval.

> 2)I want to validate a phone no for 10 digits. But in this value if I enter "+" or 
> "-" in begining then even 
> the system will accept it. So can you pls suggest me what to do to solve the problem 
> ?

In this case you only want to allow characters in the interval 0-9. I
think \d is a shortcut for that. And to limit it to only 10 occurences,
i believe you can use {0,10} so you end up with \d{0,10} if i'm not
mistaken (consult a regular expressions manual to be sure)

Tim Van Wassenhove <>

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to