RE: [PHP] Re: eregi problem
| From: | Kim Madsen | Date: | Mon, 04 Apr 2005 12:04:08 +0000 |
| Subject: | RE: [PHP] Re: eregi problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-212162@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: andreja@beogradnet.com [mailto:andreja@beogradnet.com]
> 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 witx a-z characters
> you can chek it here:
>
> http://www.php.net/manual/en/reference.pcre.pattern.syntax.php
True, but look careful at what HE did:
> > if((eregi("[^a-zA-Z0-9]",$GP[sifre])
Putting the ^ _inside_ [] means NOT, so if any of the chars a-z0-9 is in the string it´s NOT
matched.
Also there´s no idea in having a-zA-Z in the pattern since eregi() is case insensitive.
--
Med venlig hilsen / best regards
ComX Networks A/S
Kim Madsen
Systemudvikler/systemdeveloper