Re: Regular expression
| From: | _lallous | Date: | Wed, 14 Nov 2001 11:34:09 +0000 |
| Subject: | Re: Regular expression | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-10393@lists.php.net to get a copy of this message | ||
try that:
ereg("^[a-zA-Z]+")
"Priya Chanu" <priya_chanu@yahoo.com> wrote in message
news:20011107153218.73983.qmail@web11407.mail.yahoo.com...
> 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