What I mean:
Example
$pattern = '/^[s]{1,5}/';
$str = 'sssssssssssss';
$a = preg_match($pattern, $str);
echo $a; // $a => 1 (true)
But I need to validate only strings below 6 symbols length. Allowed to use only regular expressions!
What I mean:
Example
$pattern = '/^[s]{1,5}/';
$str = 'sssssssssssss';
$a = preg_match($pattern, $str);
echo $a; // $a => 1 (true)
But I need to validate only strings below 6 symbols length. Allowed to use only regular expressions!