try that:
ereg("^[a-zA-Z]+")

"Priya Chanu" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hello Everyone ,
>
> I am a beginner with regular expression.
>
> I want a string to be on only alphabets both upper and
> lower case.
>
> So to check it i do the following:
>
> $vorname = "myname";
> if(ereg("([a-z])",$vorname,$name))
> {
>   print "formerror=false";
> }
> else
> {
>   print "formerror=TRUE";
> }
>
> i always get the messge "formerror=false" no matter if
> i replace the $vorname with something like
> "343dfsdfsdf".
>
> Can some one help me in advance.
>
> priya
>
>
> __________________________________________________
> Do You Yahoo!?
> Find a job, post your resume.
> http://careers.yahoo.com



-- 
PHP Windows 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