PHP 4.0 Bug #10179: repetition quantifiers
| From: | teo at gecadsoftware dot com | Date: | Thu, 05 Apr 2001 09:29:59 +0000 |
| Subject: | PHP 4.0 Bug #10179: repetition quantifiers | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-50923@lists.php.net to get a copy of this message | ||
From: teo@gecadsoftware.com
Operating system: SuSE7.0
PHP version: 4.0.4pl1
PHP Bug Type: PCRE related
Bug description: repetition quantifiers
I am not sure if it's a bug or misinterpretation on my side
but I expect something like /[0-9]{,10}/ to match
a number at most 10 chars.
the following snipet reproduces the "problem", if any:
if (preg_match('/^[0-9]{,10}$/',3)) {
echo "matched";
} else {
echo "not matched";
}
outputs "not matched".
And if I write {1,10} it matches. So the question is,
is the "minimum" quantifier mandatory?
ciao
--
Edit Bug report at: http://bugs.php.net/?id=10179&edit=1