пхп регулярка:
var_dump(preg_match("/^\d{0,10}$/",«01234567»)); => 1 ( любое число от нуля до 10)
var_dump(preg_match("/^\d{,10}$/",«01234567»)); => 0 ( любое число от ничего до 10)
php.net/manual/en/regexp.reference.repetition.php
An opening curly bracket that appears in a position where a quantifier is not allowed, or one that does not match the syntax of a quantifier, is taken as a literal character.
For example, {,6} is not a quantifier, but a literal string of four characters