Hi!
no it dose not work!
now it even not accepts kaab ?
for the space, what i mean is that the user won't insert space only !



>From: jaydub <[EMAIL PROTECTED]>
>To: kaab kaoutar <[EMAIL PROTECTED]>
>Subject: Re: [PHP] form validation :ereg ()
>Date: Tue, 30 Jan 2001 09:21:09 -0800 (PST)
>
>The patter will allow numbers because we didn't
>explicitly put numbers in the charachter clas.
>
>To avoid allowing numbers, add in '0-9' to the
>beginning of the bracketed expression:
>
>[^0-9a-zA-z.....] etc
>
>to disallow spaces at the beginning, the easiest
>thing is to trim the input.
>
>so, if you have a posted variable with the
>value: ' myname', then reassign the variable
>like: $name = trim($name);
>
>this will removed leading and trailing spaces.
>
>Jeff
>
>
>
>
>=>  Hi!
>=>  thanks for the answer !
>=>  but for eregi("[^a-zA-Z[:space:]ëàéêêàäïüöûâç-]",$name);
>=>  it accespts also numbers hen i give kaab1 as input it accept it ? 
>strange ?!
>=>  by the way how can i add the fact that the name should not start with 
>space
>=>  ?
>=>  thanks a lot !
>=>
>=>
>=>
>=>  >From: "Jeff Warrington" <[EMAIL PROTECTED]>
>=>  >To: [EMAIL PROTECTED]
>=>  >Subject: Re: [PHP] form validation :ereg ()
>=>  >Date: Mon, 29 Jan 2001 17:55:22 -0800
>=>  >
>=>  >In article <[EMAIL PROTECTED]>, "kaab kaoutar"
>=>  ><[EMAIL PROTECTED]> wrote:
>=>  >
>=>  >If you wish to include a hyphen in the allowed character list of a
>=>  >pattern match, you must include it as the last character.
>=>  >
>=>  >So what you want should be more like:
>=>  >
>=>  >if (eregi("[^a-zA-Zëàéêêàäïüöûâç-]",$name)) {
>=>  >     print("your name can't include non-letter, etc....");
>=>  >}
>=>  >
>=>  >You can add space with:  [:space:] within the charachter
>=>  >class ([^a-zA-Z[:space:]ëàéêêàäïüöûâç-])
>=>  >
>=>  >Jeff
>=>  >
>=>  >
>=>  > > Hi again!
>=>  > >
>=>  > > I still did not fix my prob : I want to check, in a form, that the 
>name
>=>  > > input may include an alphabetical  letter a- z, A-Z, or a space, or 
>-,
>=>  > > or à, or ä or ü etc how can i do that ? i used
>=>  > > ereg("([a-z,A-Z][ë,à]?)",$name) then
>=>  > > (!ereg("([a-z,A-Z,é,ê,è,ë,-,\t,à,ä,ï,ü,ö,û,â,ç])", $name))
>=>  > > i get the following warnin :REG_ERANGE:,invalid character range by 
>the
>=>  > > way how to add space " " and "-" ?
>=>  > >
>=>  > > Please help!
>=>  > >
>=>  > > Thanks
>=>  > >
>=>  > >
>=>  > >
>=>  
> >_________________________________________________________________________
>=>  > > Get Your Private, Free E-mail from MSN Hotmail at
>=>  > > http://www.hotmail.com.
>=>  > >
>=>  > >
>=>  > >
>=>  >
>=>  >--
>=>  >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]
>=>  >
>=>
>=>  
>_________________________________________________________________________
>=>  Get Your Private, Free E-mail from MSN Hotmail at 
>http://www.hotmail.com.
>=>
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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