Re: [PHP] Re: eregi problem

2005-04-04 Thread M. Sokolewicz
Kim Madsen wrote: -Original Message- From: M. Sokolewicz [mailto:[EMAIL PROTECTED] Sent: Monday, April 04, 2005 3:08 PM Putting the ^ _inside_ [] means NOT, so if any of the chars a-z0-9 is in the string it´s NOT matched. actually, that's not entirely correct. The regexp basically means

RE: [PHP] Re: eregi problem

2005-04-04 Thread Kim Madsen
> -Original Message- > From: M. Sokolewicz [mailto:[EMAIL PROTECTED] > Sent: Monday, April 04, 2005 3:08 PM > > Putting the ^ _inside_ [] means NOT, so if any of the chars a-z0-9 is in > the string it´s NOT matched. > actually, that's not entirely correct. The regexp basically means tha

Re: [PHP] Re: eregi problem

2005-04-04 Thread M. Sokolewicz
Kim Madsen wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Sunday, April 03, 2005 6:03 PM To: php-general@lists.php.net Subject: [PHP] Re: eregi problem i'm not familliar with regular expresions but i think that ^a-z - means that variable must start

RE: [PHP] Re: eregi problem

2005-04-04 Thread Kim Madsen
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Sunday, April 03, 2005 6:03 PM > To: php-general@lists.php.net > Subject: [PHP] Re: eregi problem > > i'm not familliar with regular expresions but i think that ^a-z - means >

[PHP] Re: eregi problem

2005-04-03 Thread M. Sokolewicz
you'd be better off with something like if(preg_match('#^[a-z0-9]+$#i', $GP['sifre'])) { echo 'contains only alphanumeric chars'; } else { echo 'contains characters which are not alphanumeric'; } - tul [EMAIL PROTECTED] wrote: I really dont know :) <[EMAIL PROTECTED]> wrote in mess

[PHP] Re: eregi problem

2005-04-03 Thread andreja
I really dont know :) <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I m trying to check $GP[sifre] variable, $GP[sifre] must consist of alpha > numeric chars only. here, how I check the variable: > > if((eregi("[^a-zA-Z0-9]",$GP[sifre]) >echo 'true'; > else >echo 'false';

[PHP] Re: eregi problem

2005-04-03 Thread andreja
i'm not familliar with regular expresions but i think that ^a-z - means that variable must start witx a-z characters you can chek it here: http://www.php.net/manual/en/reference.pcre.pattern.syntax.php <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I m trying to check $GP[sifre