RE: [PHP] minus in [] groups in ereg
| From: | Johnson, Kirk | Date: | Thu, 13 Sep 2001 15:39:04 +0000 |
| Subject: | RE: [PHP] minus in [] groups in ereg | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-67236@lists.php.net to get a copy of this message | ||
Feature. By placing a "dash" next to the bracket, there is no confusion that
the dash is being used to specify a range.
Kirk
> -----Original Message-----
> From: Andrew Perevodchik [mailto:ok@naverex.kiev.ua]
> Sent: Thursday, September 13, 2001 9:32 AM
> To: php-general@lists.php.net
> Subject: [PHP] minus in [] groups in ereg
>
>
> Is this a bug or feature? The only way to include
> a minus characher in [] groups in regex is to put
> \- right gefore ]
>
> [[A-Za-z0-9\_\-\=\%\.]] won't work with "-" as it is supposed to
> [[A-Za-z0-9\_\=\%\.\-]] is ok
>
> Uh?